VCLib Documentation  6.12.2

Homographic Image Transformations

Homographic Image Transformations

Functions

I32 fourpoint_calculate (point *p0, point *p1, point *p2, point *p3, point *q0, point *q1, point *q2, point *q3, F32 **a)
 Calculates the Inverse Homography Transformation Matrix for 2×4 Coordinate Points. More...
 
I32 homography_image_transform (image *src, image *dst, F32 a[3][3], U8 bgnd)
 Subpixel Interpolated Homography Transformation of an Image. More...
 

Detailed Description

Function Documentation

◆ fourpoint_calculate()

I32 fourpoint_calculate ( point p0,
point p1,
point p2,
point p3,
point q0,
point q1,
point q2,
point q3,
float **  a 
)

The function calculates the inverse homography transformation matrix from sample point mappings given: Input to the function are four known points in the original coordinate system and their image points in the transformed coordinate system.

See also
Bernd Jaehne, practical handbook on image processing for scientific applications pp 268-270.
Parameters
[in]p0,p1,p2,p3Sample Point Positions before Transformation.
[in]q0,q1,q2,q3Sample Point Positions after Transformation.
[out]aInverse 2D Transformation Matrix 3×3.
Returns
Standard Error Code.
Return values
ERR_MEMORYif Memory Allocation Fails.
ERR_SINGULARif Point Selection is Inappropriate.
ERR_NONEon Success.

◆ homography_image_transform()

I32 homography_image_transform ( image src,
image dst,
float  a[3][3],
U8  bgnd 
)

This function performs a subpixel interpolated homography transformation to an image using the inverse homography matrix, e.g. returned by fourpoint_calculate(). Be aware that the inverse transformation matrix is required.

Parameters
[in]srcPoints to Source Image.
[out]dstPoints to Destination Image.
[in]aInverse Homography Matrix.
[in]bgndBackground Grey Value.
Return values
ERR_FORMATif src or dst is NULL.
ERR_NONEon Success.