projective_trans_contour_xldT_projective_trans_contour_xldProjectiveTransContourXldProjectiveTransContourXldprojective_trans_contour_xld — Apply a projective transformation to an XLD contour.
The used coordinate system is the same as in affine_trans_pixelaffine_trans_pixelAffineTransPixelAffineTransPixelaffine_trans_pixel. This
means that in fact not HomMat2DHomMat2DHomMat2DhomMat2Dhom_mat_2d is applied but a modified
version. Therefore, applying projective_trans_contour_xldprojective_trans_contour_xldProjectiveTransContourXldProjectiveTransContourXldprojective_trans_contour_xld corresponds to
the following chain of transformations, which is applied to each point
of the contour (input and output
pixels as homogeneous vectors):
As an effect, you might get unexpected results when creating projective
transformations based on coordinates that are derived from the
contour, e.g., by operators like
area_center_xldarea_center_xldAreaCenterXldAreaCenterXldarea_center_xld. For example, if you use this operator to calculate
the center of gravity of a rotationally symmetric XLD contour and then rotate
the contour around this point using hom_mat2d_rotatehom_mat2d_rotateHomMat2dRotateHomMat2dRotatehom_mat2d_rotate, the resulting
contour will not lie on the original one. In such a case, you can compensate
this effect by applying the following translations to HomMat2DHomMat2DHomMat2DhomMat2Dhom_mat_2d
before using it in projective_trans_contour_xldprojective_trans_contour_xldProjectiveTransContourXldProjectiveTransContourXldprojective_trans_contour_xld: