ClassesClassesClassesClasses | | | | Operators

affine_trans_point_2dT_affine_trans_point_2dAffineTransPoint2daffine_trans_point_2dAffineTransPoint2dAffineTransPoint2d (Operator)

Name

affine_trans_point_2dT_affine_trans_point_2dAffineTransPoint2daffine_trans_point_2dAffineTransPoint2dAffineTransPoint2d — Apply an arbitrary affine 2D transformation to points.

Signature

affine_trans_point_2d( : : HomMat2D, Px, Py : Qx, Qy)

Herror T_affine_trans_point_2d(const Htuple HomMat2D, const Htuple Px, const Htuple Py, Htuple* Qx, Htuple* Qy)

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)

void AffineTransPoint2d(const HTuple& HomMat2D, const HTuple& Px, const HTuple& Py, HTuple* Qx, HTuple* Qy)

HTuple HHomMat2D::AffineTransPoint2d(const HTuple& Px, const HTuple& Py, HTuple* Qy) const

double HHomMat2D::AffineTransPoint2d(double Px, double Py, double* Qy) const

void HOperatorSetX.AffineTransPoint2d(
[in] VARIANT HomMat2d, [in] VARIANT Px, [in] VARIANT Py, [out] VARIANT* Qx, [out] VARIANT* Qy)

VARIANT HHomMat2DX.AffineTransPoint2d(
[in] VARIANT Px, [in] VARIANT Py, [out] VARIANT* Qy)

static void HOperatorSet.AffineTransPoint2d(HTuple homMat2D, HTuple px, HTuple py, out HTuple qx, out HTuple qy)

HTuple HHomMat2D.AffineTransPoint2d(HTuple px, HTuple py, out HTuple qy)

double HHomMat2D.AffineTransPoint2d(double px, double py, out double qy)

Description

affine_trans_point_2daffine_trans_point_2dAffineTransPoint2daffine_trans_point_2dAffineTransPoint2dAffineTransPoint2d applies an arbitrary affine 2D transformation, i.e., scaling, rotation, translation, and slant (skewing), to the input points (PxPxPxPxPxpx,PyPyPyPyPypy) and returns the resulting points in (QxQxQxQxQxqx,QyQyQyQyQyqy). The affine transformation is described by the homogeneous transformation matrix given in HomMat2DHomMat2DHomMat2DHomMat2DHomMat2DhomMat2D. 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 PxPxPxPxPxpx and their column coordinates in PyPyPyPyPypy. 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.

The transformation matrix can be created using the operators hom_mat2d_identityhom_mat2d_identityHomMat2dIdentityhom_mat2d_identityHomMat2dIdentityHomMat2dIdentity, hom_mat2d_rotatehom_mat2d_rotateHomMat2dRotatehom_mat2d_rotateHomMat2dRotateHomMat2dRotate, hom_mat2d_translatehom_mat2d_translateHomMat2dTranslatehom_mat2d_translateHomMat2dTranslateHomMat2dTranslate, etc., or can be the result of operators like vector_angle_to_rigidvector_angle_to_rigidVectorAngleToRigidvector_angle_to_rigidVectorAngleToRigidVectorAngleToRigid.

For example, if HomMat2DHomMat2DHomMat2DHomMat2DHomMat2DhomMat2D corresponds to a rigid transformation, i.e., if it consists of a rotation and a translation, the points are transformed as follows:

Parallelization

Parameters

HomMat2DHomMat2DHomMat2DHomMat2DHomMat2DhomMat2D (input_control)  hom_mat2d HHomMat2D, HTupleHTupleHTupleHHomMat2DX, VARIANTHtuple (real) (double) (double) (double) (double) (double)

Input transformation matrix.

PxPxPxPxPxpx (input_control)  point.x(-array) HTupleHTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong) (double / Hlong)

Input point(s) (x or row coordinate).

Default value: 64

Suggested values: 0, 16, 32, 64, 128, 256, 512, 1024

PyPyPyPyPypy (input_control)  point.y(-array) HTupleHTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong) (double / Hlong)

Input point(s) (y or column coordinate).

Default value: 64

Suggested values: 0, 16, 32, 64, 128, 256, 512, 1024

QxQxQxQxQxqx (output_control)  point.x(-array) HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Output point(s) (x or row coordinate).

QyQyQyQyQyqy (output_control)  point.y(-array) HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Output point(s) (y or column coordinate).

Result

If the matrix HomMat2DHomMat2DHomMat2DHomMat2DHomMat2DhomMat2D represents an affine transformation (i.e., not a projective transformation), affine_trans_point_2daffine_trans_point_2dAffineTransPoint2daffine_trans_point_2dAffineTransPoint2dAffineTransPoint2d returns 2 (H_MSG_TRUE). Otherwise, an exception is raised.

Possible Predecessors

hom_mat2d_translatehom_mat2d_translateHomMat2dTranslatehom_mat2d_translateHomMat2dTranslateHomMat2dTranslate, hom_mat2d_translate_localhom_mat2d_translate_localHomMat2dTranslateLocalhom_mat2d_translate_localHomMat2dTranslateLocalHomMat2dTranslateLocal, hom_mat2d_scalehom_mat2d_scaleHomMat2dScalehom_mat2d_scaleHomMat2dScaleHomMat2dScale, hom_mat2d_scale_localhom_mat2d_scale_localHomMat2dScaleLocalhom_mat2d_scale_localHomMat2dScaleLocalHomMat2dScaleLocal, hom_mat2d_rotatehom_mat2d_rotateHomMat2dRotatehom_mat2d_rotateHomMat2dRotateHomMat2dRotate, hom_mat2d_rotate_localhom_mat2d_rotate_localHomMat2dRotateLocalhom_mat2d_rotate_localHomMat2dRotateLocalHomMat2dRotateLocal, hom_mat2d_slanthom_mat2d_slantHomMat2dSlanthom_mat2d_slantHomMat2dSlantHomMat2dSlant, hom_mat2d_slant_localhom_mat2d_slant_localHomMat2dSlantLocalhom_mat2d_slant_localHomMat2dSlantLocalHomMat2dSlantLocal, hom_mat2d_reflecthom_mat2d_reflectHomMat2dReflecthom_mat2d_reflectHomMat2dReflectHomMat2dReflect, hom_mat2d_reflect_localhom_mat2d_reflect_localHomMat2dReflectLocalhom_mat2d_reflect_localHomMat2dReflectLocalHomMat2dReflectLocal

Possible Successors

hom_mat2d_translatehom_mat2d_translateHomMat2dTranslatehom_mat2d_translateHomMat2dTranslateHomMat2dTranslate, hom_mat2d_translate_localhom_mat2d_translate_localHomMat2dTranslateLocalhom_mat2d_translate_localHomMat2dTranslateLocalHomMat2dTranslateLocal, hom_mat2d_scalehom_mat2d_scaleHomMat2dScalehom_mat2d_scaleHomMat2dScaleHomMat2dScale, hom_mat2d_scale_localhom_mat2d_scale_localHomMat2dScaleLocalhom_mat2d_scale_localHomMat2dScaleLocalHomMat2dScaleLocal, hom_mat2d_rotatehom_mat2d_rotateHomMat2dRotatehom_mat2d_rotateHomMat2dRotateHomMat2dRotate, hom_mat2d_rotate_localhom_mat2d_rotate_localHomMat2dRotateLocalhom_mat2d_rotate_localHomMat2dRotateLocalHomMat2dRotateLocal, hom_mat2d_slanthom_mat2d_slantHomMat2dSlanthom_mat2d_slantHomMat2dSlantHomMat2dSlant, hom_mat2d_slant_localhom_mat2d_slant_localHomMat2dSlantLocalhom_mat2d_slant_localHomMat2dSlantLocalHomMat2dSlantLocal, hom_mat2d_reflecthom_mat2d_reflectHomMat2dReflecthom_mat2d_reflectHomMat2dReflectHomMat2dReflect, hom_mat2d_reflect_localhom_mat2d_reflect_localHomMat2dReflectLocalhom_mat2d_reflect_localHomMat2dReflectLocalHomMat2dReflectLocal

Module

Foundation


ClassesClassesClassesClasses | | | | Operators