感谢感谢,我知道错哪里了,缩放矩阵参数没有反转
总结一下,基本写法参考create_average_shape_model.hdev
- vector_angle_to_rigid (RowX, ColumnX, 0, Row, Column, Angle, HomMat2D)
- hom_mat2d_scale (HomMat2D, Scale, Scale, Row, Column, HomMat2DScale)
- hom_mat2d_invert (HomMat2DScale, HomMat2DInvert)
- affine_trans_image (Image, ImageAffineTrans, HomMat2DInvert, 'constant', 'false')
复制代码
去掉逆变换的写法:
- vector_angle_to_rigid (Row, Column, Angle, RowX, ColumnX, 0, HomMat2D)
- hom_mat2d_scale (HomMat2D, 1.0/Scale, 1.0/Scale, RowX, ColumnX, HomMat2DScale)
- affine_trans_image (Image, ImageAffineTrans, HomMat2DScale, 'constant', 'false')
复制代码
去掉刚性变换的写法:
- hom_mat2d_identity (HomMat2DIdentity)
- hom_mat2d_rotate (HomMat2DIdentity, (0-Angle), Row, Column, HomMat2DRotate)
- hom_mat2d_translate (HomMat2DRotate, (RowX-Row), (ColumnX-Column), HomMat2DTranslate)
- hom_mat2d_scale (HomMat2DTranslate, 1.0/Scale, 1.0/Scale, RowX, ColumnX, HomMat2DScale)
- affine_trans_image (Image, ImageAffineTrans, HomMat2DScale, 'constant', 'false')
复制代码 |