ClassesClassesClassesClasses | | | | Operators

hom_mat2d_to_affine_parT_hom_mat2d_to_affine_parHomMat2dToAffineParhom_mat2d_to_affine_parHomMat2dToAffineParHomMat2dToAffinePar (Operator)


hom_mat2d_to_affine_parT_hom_mat2d_to_affine_parHomMat2dToAffineParhom_mat2d_to_affine_parHomMat2dToAffineParHomMat2dToAffinePar — Compute the affine transformation parameters from a homogeneous 2D transformation matrix.


hom_mat2d_to_affine_par( : : HomMat2D : Sx, Sy, Phi, Theta, Tx, Ty)

Herror T_hom_mat2d_to_affine_par(const Htuple HomMat2D, Htuple* Sx, Htuple* Sy, Htuple* Phi, Htuple* Theta, Htuple* Tx, Htuple* Ty)

Herror hom_mat2d_to_affine_par(const HTuple& HomMat2D, double* Sx, double* Sy, double* Phi, double* Theta, double* Tx, double* Ty)

void HomMat2dToAffinePar(const HTuple& HomMat2D, HTuple* Sx, HTuple* Sy, HTuple* Phi, HTuple* Theta, HTuple* Tx, HTuple* Ty)

double HHomMat2D::HomMat2dToAffinePar(double* Sy, double* Phi, double* Theta, double* Tx, double* Ty) const

void HOperatorSetX.HomMat2dToAffinePar(
[in] VARIANT HomMat2d, [out] VARIANT* Sx, [out] VARIANT* Sy, [out] VARIANT* Phi, [out] VARIANT* Theta, [out] VARIANT* Tx, [out] VARIANT* Ty)

double HHomMat2DX.HomMat2dToAffinePar(
[out] double* Sy, [out] double* Phi, [out] double* Theta, [out] double* Tx, [out] double* Ty)

static void HOperatorSet.HomMat2dToAffinePar(HTuple homMat2D, out HTuple sx, out HTuple sy, out HTuple phi, out HTuple theta, out HTuple tx, out HTuple ty)

double HHomMat2D.HomMat2dToAffinePar(out double sy, out double phi, out double theta, out double tx, out double ty)


hom_mat2d_to_affine_parhom_mat2d_to_affine_parHomMat2dToAffineParhom_mat2d_to_affine_parHomMat2dToAffineParHomMat2dToAffinePar computes the affine transformation parameters corresponding to the homogeneous 2D transformation matrix HomMat2DHomMat2DHomMat2DHomMat2DHomMat2DhomMat2D. The parameters SxSxSxSxSxsx and SySySySySysy determine how the transformation scales the original x- and y-axes, respectively. The two scaling factors are always positive. The angle ThetaThetaThetaThetaThetatheta describes whether the transformed coordinate axes are orthogonal (ThetaThetaThetaThetaThetatheta = 0) or slanted. If |ThetaThetaThetaThetaThetatheta| > pi/2, the transformation contains a reflection. The angle PhiPhiPhiPhiPhiphi determines the rotation of the transformed x-axis with respect to the original x-axis. The parameters TxTxTxTxTxtx and TyTyTyTyTyty determine the translation of the two coordinate systems. The matrix HomMat2DHomMat2DHomMat2DHomMat2DHomMat2DhomMat2D can be constructed from the six transformation parameters by the following operator sequence:

  hom_mat2d_identity (HomMat2DIdentity)
  hom_mat2d_scale (HomMat2DIdentity, Sx, Sy, 0, 0, HomMat2DScale)
  hom_mat2d_slant (HomMat2DScale, Theta, 'y', 0, 0, HomMat2DSlant)
  hom_mat2d_rotate (HomMat2DSlant, Phi, 0, 0, HomMat2DRotate)
  hom_mat2d_translate (HomMat2DRotate, Tx, Ty, HomMat2D)

This is equivalent to the following chain of transformation matrices:

             / 1 0 +Tx \   / cos(Phi) -sin(Phi) 0 \   / 1 -sin(Theta) 0 \   / Sx 0  0 \
  HomMat2D = | 0 1 +Ty | * | sin(Phi)  cos(Phi) 0 | * | 0  cos(Theta) 0 | * | 0  Sy 0 |
             \ 0 0  1  /   \    0         0     1 /   \ 0     0       1 /   \ 0  0  1 /



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

Input transformation matrix.

SxSxSxSxSxsx (output_control)  real HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Scaling factor along the x direction.

SySySySySysy (output_control)  real HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Scaling factor along the y direction.

PhiPhiPhiPhiPhiphi (output_control)  angle.rad HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Rotation angle.

ThetaThetaThetaThetaThetatheta (output_control)  angle.rad HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Slant angle.

TxTxTxTxTxtx (output_control)  point.x HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Translation along the x direction.

TyTyTyTyTyty (output_control)  point.y HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Translation along the y direction.


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

Possible Predecessors

vector_to_hom_mat2dvector_to_hom_mat2dVectorToHomMat2dvector_to_hom_mat2dVectorToHomMat2dVectorToHomMat2d, vector_to_rigidvector_to_rigidVectorToRigidvector_to_rigidVectorToRigidVectorToRigid, vector_to_similarityvector_to_similarityVectorToSimilarityvector_to_similarityVectorToSimilarityVectorToSimilarity

Possible Successors

hom_mat2d_translatehom_mat2d_translateHomMat2dTranslatehom_mat2d_translateHomMat2dTranslateHomMat2dTranslate, hom_mat2d_scalehom_mat2d_scaleHomMat2dScalehom_mat2d_scaleHomMat2dScaleHomMat2dScale, hom_mat2d_rotatehom_mat2d_rotateHomMat2dRotatehom_mat2d_rotateHomMat2dRotateHomMat2dRotate, hom_mat2d_slanthom_mat2d_slantHomMat2dSlanthom_mat2d_slantHomMat2dSlantHomMat2dSlant



ClassesClassesClassesClasses | | | | Operators