affine_trans_point_2dT_affine_trans_point_2dAffineTransPoint2dAffineTransPoint2daffine_trans_point_2d — Apply an arbitrary affine 2D transformation to points.
affine_trans_point_2daffine_trans_point_2dAffineTransPoint2dAffineTransPoint2daffine_trans_point_2d applies an arbitrary affine 2D transformation,
i.e., scaling, rotation, translation, and slant (skewing), to the input
points (PxPxPxpxpx,PyPyPypypy) and returns the resulting points in
(QxQxQxqxqx,QyQyQyqyqy). The affine transformation is described by the
homogeneous transformation matrix given in HomMat2DHomMat2DHomMat2DhomMat2Dhom_mat_2d. This
corresponds to the following equation (input and output points as
homogeneous vectors):
If the points to transform are specified in standard image coordinates, their
row coordinates must be passed in PxPxPxpxpx and their column
coordinates in PyPyPypypy. 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.
For example, if HomMat2DHomMat2DHomMat2DhomMat2Dhom_mat_2d corresponds to a rigid transformation,
i.e., if it consists of a rotation and a translation, the
points are transformed as follows:
Execution Information
Multithreading type: reentrant (runs in parallel with non-exclusive operators).
Multithreading scope: global (may be called from any thread).
Automatically parallelized on internal data level.
If the matrix HomMat2DHomMat2DHomMat2DhomMat2Dhom_mat_2d represents an affine transformation
(i.e., not a projective transformation),
affine_trans_point_2daffine_trans_point_2dAffineTransPoint2dAffineTransPoint2daffine_trans_point_2d returns 2 (
H_MSG_TRUE)
. Otherwise, an exception
is raised.