Operators |
hom_mat2d_to_affine_par — Compute the affine transformation parameters from a homogeneous 2D transformation matrix.
hom_mat2d_to_affine_par computes the affine transformation parameters corresponding to the homogeneous 2D transformation matrix HomMat2D. The parameters Sx and Sy determine how the transformation scales the original x- and y-axes, respectively. The two scaling factors are always positive. The angle Theta describes whether the transformed coordinate axes are orthogonal (Theta = 0) or slanted. If , the transformation contains a reflection. The angle Phi determines the rotation of the transformed x-axis with respect to the original x-axis. The parameters Tx and Ty determine the translation of the two coordinate systems. The matrix HomMat2D 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:
Input transformation matrix.
Scaling factor along the x direction.
Scaling factor along the y direction.
Rotation angle.
Slant angle.
Translation along the x direction.
Translation along the y direction.
If the matrix HomMat2D is non-degenerate and represents an affine transformation (i.e., not a projective transformation), hom_mat2d_to_affine_par returns 2 (H_MSG_TRUE). Otherwise, an exception is raised.
vector_to_hom_mat2d, vector_to_rigid, vector_to_similarity, vector_to_aniso, point_line_to_hom_mat2d
hom_mat2d_translate, hom_mat2d_scale, hom_mat2d_rotate, hom_mat2d_slant
Foundation
Operators |