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... | |
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.
[in] | p0,p1,p2,p3 | Sample Point Positions before Transformation. |
[in] | q0,q1,q2,q3 | Sample Point Positions after Transformation. |
[out] | a | Inverse 2D Transformation Matrix 3×3. |
ERR_MEMORY | if Memory Allocation Fails. |
ERR_SINGULAR | if Point Selection is Inappropriate. |
ERR_NONE | on Success. |
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.
[in] | src | Points to Source Image. |
[out] | dst | Points to Destination Image. |
[in] | a | Inverse Homography Matrix. |
[in] | bgnd | Background Grey Value. |
ERR_FORMAT | if src or dst is NULL. |
ERR_NONE | on Success. |