Herror ::affine_trans_point_2d (
    const HTuple &HomMat2D,
    const HTuple &Px,
    const HTuple &Py,
    double *Qx,
    double *Qy
)
Herror ::affine_trans_point_2d (
    const HTuple &HomMat2D,
    const HTuple &Px,
    const HTuple &Py,
    HTuple *Qx,
    HTuple *Qy
)

Apply a homogeneous 2D transformation matrix to points.

::affine_trans_point_2d calculates the result of applying the affine transformation, given by the homogeneous 2D transformation matrix HomMat2D, to the input points (Px,Py). The resulting points are returned in (Qx,Qy).

If the coordinates (Px,Py) are image coordinates, it should be noted that the components of the homogeneous transformation matrix are to be interpreted as follows: the row coordinate of the image corresponds to the x coordinate of the matrix, while the column coordinate of the image corresponds to the y coordinate of the matrix. This is necessary to obtain a right-handed coordinate system, which is assumed for the homogeneous transformation matrices, also for the image. In particular, by doing so roatations are performed in the correct direction. Note that the (x,y) order of the matrices quite naturally corresponds to the usual (row,column) order for coordinates in the image.


Parameters

HomMat2D (input_control)
affine2d-array -> HTuple.double
Input transformation matrix.
Number of elements: 6

Px (input_control)
point.x(-array) -> HTuple.double / long
Input point (x coordinate).
Default value: 64
Suggested values: 0, 16, 32, 64, 128, 256, 512, 1024
Typical range of values: 0 <= Px <= 1024
Minimum increment: 1
Recommended increment: 10

Py (input_control)
point.y(-array) -> HTuple.double / long
Input point (y coordinate).
Default value: 64
Suggested values: 0, 16, 32, 64, 128, 256, 512, 1024
Typical range of values: 0 <= Py <= 1024
Minimum increment: 1
Recommended increment: 10

Qx (output_control)
point.x(-array) -> (HTuple.) double *
Output point (x coordinate).

Qy (output_control)
point.y(-array) -> (HTuple.) double *
Output point (y coordinate).


Result

::affine_trans_point_2d always returns H_MSG_TRUE.


Possible Predecessors

::hom_mat2d_translate, ::hom_mat2d_scale, ::hom_mat2d_rotate


Possible Successors

::hom_mat2d_translate, ::hom_mat2d_scale, ::hom_mat2d_rotate


Module

Basic operators



Copyright © 1996-2002 MVTec Software GmbH