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.
|
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). | |
::affine_trans_point_2d always returns H_MSG_TRUE.
::hom_mat2d_translate, ::hom_mat2d_scale, ::hom_mat2d_rotate
::hom_mat2d_translate, ::hom_mat2d_scale, ::hom_mat2d_rotate
Basic operators