hom_mat2d_to_affine_par T_hom_mat2d_to_affine_par HomMat2dToAffinePar HomMat2dToAffinePar hom_mat2d_to_affine_par (算子)
名称
hom_mat2d_to_affine_par T_hom_mat2d_to_affine_par HomMat2dToAffinePar HomMat2dToAffinePar hom_mat2d_to_affine_par — 从齐次二维变换矩阵计算仿射变换参数。
签名
Herror T_hom_mat2d_to_affine_par (const Htuple HomMat2D , Htuple* Sx , Htuple* Sy , Htuple* Phi , Htuple* Theta , Htuple* Tx , Htuple* 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
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 )
def hom_mat2d_to_affine_par (hom_mat_2d : Sequence[float]) -> Tuple[float, float, float, float, float, float]
描述
hom_mat2d_to_affine_par hom_mat2d_to_affine_par HomMat2dToAffinePar HomMat2dToAffinePar HomMat2dToAffinePar hom_mat2d_to_affine_par computes the affine transformation parameters
corresponding to the homogeneous 2D transformation matrix HomMat2D HomMat2D HomMat2D HomMat2D homMat2D hom_mat_2d .
The parameters Sx Sx Sx Sx sx sx and Sy Sy Sy Sy sy sy determine how the transformation
scales the original x- and y-axes, respectively. The two scaling factors are
always positive. The angle Theta Theta Theta Theta theta theta describes whether the transformed
coordinate axes are orthogonal (Theta Theta Theta Theta theta theta = 0) or slanted. If
, the transformation
contains a reflection. The angle Phi Phi Phi Phi phi phi determines the rotation of the
transformed x-axis with respect to the original x-axis. The parameters
Tx Tx Tx Tx tx tx and Ty Ty Ty Ty ty ty determine the translation of the two coordinate
systems. The matrix HomMat2D HomMat2D HomMat2D HomMat2D homMat2D hom_mat_2d can be constructed from the six
transformation parameters by the following operator sequence:
hom_mat2d_identity(HomMat2DIdentity) hom_mat2d_identity(HomMat2DIdentity) HomMat2dIdentity(HomMat2DIdentity) HomMat2dIdentity(HomMat2DIdentity) HomMat2dIdentity(HomMat2DIdentity) hom_mat2d_identity(HomMat2DIdentity)
hom_mat2d_scale(HomMat2DIdentity, Sx, Sy, 0, 0, HomMat2DScale) hom_mat2d_scale(HomMat2DIdentity, Sx, Sy, 0, 0, HomMat2DScale) HomMat2dScale(HomMat2DIdentity, Sx, Sy, 0, 0, HomMat2DScale) HomMat2dScale(HomMat2DIdentity, Sx, Sy, 0, 0, HomMat2DScale) HomMat2dScale(HomMat2DIdentity, Sx, Sy, 0, 0, HomMat2DScale) hom_mat2d_scale(HomMat2DIdentity, Sx, Sy, 0, 0, HomMat2DScale)
hom_mat2d_slant(HomMat2DScale, Theta, 'y', 0, 0, HomMat2DSlant) hom_mat2d_slant(HomMat2DScale, Theta, "y", 0, 0, HomMat2DSlant) HomMat2dSlant(HomMat2DScale, Theta, "y", 0, 0, HomMat2DSlant) HomMat2dSlant(HomMat2DScale, Theta, "y", 0, 0, HomMat2DSlant) HomMat2dSlant(HomMat2DScale, Theta, "y", 0, 0, HomMat2DSlant) hom_mat2d_slant(HomMat2DScale, Theta, "y", 0, 0, HomMat2DSlant)
hom_mat2d_rotate(HomMat2DSlant, Phi, 0, 0, HomMat2DRotate) hom_mat2d_rotate(HomMat2DSlant, Phi, 0, 0, HomMat2DRotate) HomMat2dRotate(HomMat2DSlant, Phi, 0, 0, HomMat2DRotate) HomMat2dRotate(HomMat2DSlant, Phi, 0, 0, HomMat2DRotate) HomMat2dRotate(HomMat2DSlant, Phi, 0, 0, HomMat2DRotate) hom_mat2d_rotate(HomMat2DSlant, Phi, 0, 0, HomMat2DRotate)
hom_mat2d_translate(HomMat2DRotate, Tx, Ty, HomMat2D) hom_mat2d_translate(HomMat2DRotate, Tx, Ty, HomMat2D) HomMat2dTranslate(HomMat2DRotate, Tx, Ty, HomMat2D) HomMat2dTranslate(HomMat2DRotate, Tx, Ty, HomMat2D) HomMat2dTranslate(HomMat2DRotate, Tx, Ty, HomMat2D) hom_mat2d_translate(HomMat2DRotate, Tx, Ty, HomMat2D)
This is equivalent to the following chain of transformation matrices:
执行信息
多线程类型:可重入(与非独占算子并行运行)。
多线程作用域:全局(可从任何线程调用)。
未采用并行化处理。
参数
HomMat2D HomMat2D HomMat2D HomMat2D homMat2D hom_mat_2d (输入控制) hom_mat2d → HHomMat2D , HTuple Sequence[float] HTuple Htuple (real) (double ) (double ) (double )
输入变换矩阵。
Sx Sx Sx Sx sx sx (输出控制) real → HTuple float HTuple Htuple (real) (double ) (double ) (double )
Scaling factor along the x direction.
Sy Sy Sy Sy sy sy (输出控制) real → HTuple float HTuple Htuple (real) (double ) (double ) (double )
Scaling factor along the y direction.
Phi Phi Phi Phi phi phi (输出控制) angle.rad → HTuple float HTuple Htuple (real) (double ) (double ) (double )
Rotation angle.
Theta Theta Theta Theta theta theta (输出控制) angle.rad → HTuple float HTuple Htuple (real) (double ) (double ) (double )
Slant angle.
Tx Tx Tx Tx tx tx (输出控制) point.x → HTuple float HTuple Htuple (real) (double ) (double ) (double )
Translation along the x direction.
Ty Ty Ty Ty ty ty (输出控制) point.y → HTuple float HTuple Htuple (real) (double ) (double ) (double )
Translation along the y direction.
结果
If the matrix HomMat2D HomMat2D HomMat2D HomMat2D homMat2D hom_mat_2d is non-degenerate and represents an
affine transformation (i.e., not a projective transformation),
hom_mat2d_to_affine_par hom_mat2d_to_affine_par HomMat2dToAffinePar HomMat2dToAffinePar HomMat2dToAffinePar hom_mat2d_to_affine_par 返回 2 ( H_MSG_TRUE )。否则,将抛出异常。
可能的前趋
vector_to_hom_mat2d vector_to_hom_mat2d VectorToHomMat2d VectorToHomMat2d VectorToHomMat2d vector_to_hom_mat2d ,
vector_to_rigid vector_to_rigid VectorToRigid VectorToRigid VectorToRigid vector_to_rigid ,
vector_to_similarity vector_to_similarity VectorToSimilarity VectorToSimilarity VectorToSimilarity vector_to_similarity ,
vector_to_aniso vector_to_aniso VectorToAniso VectorToAniso VectorToAniso vector_to_aniso ,
point_line_to_hom_mat2d point_line_to_hom_mat2d PointLineToHomMat2d PointLineToHomMat2d PointLineToHomMat2d point_line_to_hom_mat2d
可能的后继
hom_mat2d_translate hom_mat2d_translate HomMat2dTranslate HomMat2dTranslate HomMat2dTranslate hom_mat2d_translate ,
hom_mat2d_scale hom_mat2d_scale HomMat2dScale HomMat2dScale HomMat2dScale hom_mat2d_scale ,
hom_mat2d_rotate hom_mat2d_rotate HomMat2dRotate HomMat2dRotate HomMat2dRotate hom_mat2d_rotate ,
hom_mat2d_slant hom_mat2d_slant HomMat2dSlant HomMat2dSlant HomMat2dSlant hom_mat2d_slant
模块
基础