affine_trans_contour_xld ( Contours : ContoursAffinTrans : HomMat2D : )

Apply an arbitrary affine 2D transformation to XLD contours.

affine_trans_contour_xld applies an arbitrary affine 2D transformation, i.e., scaling, rotation, translation, and slant (skewing), to the XLD contours given in Contours and returns the transformed contours in ContoursAffinTrans. The affine transformation is described by the homogeneous transformation matrix given in HomMat2D, which can be created using the operators hom_mat2d_identity, hom_mat2d_scale, hom_mat2d_rotate, hom_mat2d_translate, etc., or be the result of operators like vector_angle_to_rigid.

The components of the homogeneous transformation matrix are 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 for the image. In particular, this assures that rotations 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

Contours (input_object)
xld_cont(-array) -> object
Input XLD contours.

ContoursAffinTrans (output_object)
xld_cont(-array) -> object
Transformed XLD contours.

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


Result

affine_trans_contour_xld returns 2 (H_MSG_TRUE) if all parameter values are correct. If necessary, an exception is raised.


Parallelization Information

affine_trans_contour_xld is reentrant and automatically parallelized (on tuple level).


Possible Predecessors

hom_mat2d_identity, hom_mat2d_translate, hom_mat2d_rotate, hom_mat2d_scale


See also

affine_trans_image, affine_trans_region


Module

Sub-pixel operators



Copyright © 1996-2005 MVTec Software GmbH