ClassesClassesClassesClasses | | | | Operators

projective_trans_contour_xldT_projective_trans_contour_xldProjectiveTransContourXldprojective_trans_contour_xldProjectiveTransContourXldProjectiveTransContourXld (Operator)

Name

projective_trans_contour_xldT_projective_trans_contour_xldProjectiveTransContourXldprojective_trans_contour_xldProjectiveTransContourXldProjectiveTransContourXld — Apply a projective transformation to an XLD contour.

Signature

projective_trans_contour_xld(Contours : ContoursProjTrans : HomMat2D : )

Herror T_projective_trans_contour_xld(const Hobject Contours, Hobject* ContoursProjTrans, const Htuple HomMat2D)

Herror projective_trans_contour_xld(Hobject Contours, Hobject* ContoursProjTrans, const HTuple& HomMat2D)

HXLDCont HXLDCont::ProjectiveTransContourXld(const HTuple& HomMat2D) const

HXLDContArray HXLDContArray::ProjectiveTransContourXld(const HTuple& HomMat2D) const

void ProjectiveTransContourXld(const HObject& Contours, HObject* ContoursProjTrans, const HTuple& HomMat2D)

HXLDCont HXLDCont::ProjectiveTransContourXld(const HHomMat2D& HomMat2D) const

HXLDCont HHomMat2D::ProjectiveTransContourXld(const HXLDCont& Contours) const

void HOperatorSetX.ProjectiveTransContourXld(
[in] IHUntypedObjectX* Contours, [out] IHUntypedObjectX*ContoursProjTrans, [in] VARIANT HomMat2d)

IHXLDContX* HXLDContX.ProjectiveTransContourXld([in] IHHomMat2DX* HomMat2d)

IHXLDContX* HHomMat2DX.ProjectiveTransContourXld([in] IHXLDContX* Contours)

static void HOperatorSet.ProjectiveTransContourXld(HObject contours, out HObject contoursProjTrans, HTuple homMat2D)

HXLDCont HXLDCont.ProjectiveTransContourXld(HHomMat2D homMat2D)

HXLDCont HHomMat2D.ProjectiveTransContourXld(HXLDCont contours)

Description

projective_trans_contour_xldprojective_trans_contour_xldProjectiveTransContourXldprojective_trans_contour_xldProjectiveTransContourXldProjectiveTransContourXld applies the projective transformation specified by the homogeneous matrix HomMat2DHomMat2DHomMat2DHomMat2DHomMat2DhomMat2D on the contours in ContoursContoursContoursContoursContourscontours and returns the transformed contours in ContoursProjTransContoursProjTransContoursProjTransContoursProjTransContoursProjTranscontoursProjTrans.

For creation and interpretation details of this matrix see also projective_trans_imageprojective_trans_imageProjectiveTransImageprojective_trans_imageProjectiveTransImageProjectiveTransImage.

Attention

The used coordinate system is the same as in affine_trans_pixelaffine_trans_pixelAffineTransPixelaffine_trans_pixelAffineTransPixelAffineTransPixel. This means that in fact not HomMat2DHomMat2DHomMat2DHomMat2DHomMat2DhomMat2D is applied but a modified version. Therefore, applying projective_trans_contour_xldprojective_trans_contour_xldProjectiveTransContourXldprojective_trans_contour_xldProjectiveTransContourXldProjectiveTransContourXld corresponds to the following chain of transformations, which is applied to each point (Row_i, Col_i) of the contour (input and output pixels as homogeneous vectors):

  / RowTrans_i \   / 1 0 -0.5 \              / 1 0 +0.5 \   / Row_i \
  | ColTrans_i | = | 0 1 -0.5 | * HomMat2D * | 0 1 +0.5 | * | Col_i |
  \    1       /   \ 0 0   1  /              \ 0 0   1  /   \  1    /

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_xldAreaCenterXldarea_center_xldAreaCenterXldAreaCenterXld. 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_rotateHomMat2dRotatehom_mat2d_rotateHomMat2dRotateHomMat2dRotate, 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 HomMat2DHomMat2DHomMat2DHomMat2DHomMat2DhomMat2D before using it in projective_trans_contour_xldprojective_trans_contour_xldProjectiveTransContourXldprojective_trans_contour_xldProjectiveTransContourXldProjectiveTransContourXld:

  hom_mat2d_translate(HomMat2D, 0.5, 0.5, HomMat2DTmp)
  hom_mat2d_translate_local(HomMat2DTmp, -0.5, -0.5, HomMat2DAdapted)
  projective_trans_contour_xld(Contours, ContoursAffinTrans, HomMat2DAdapted)

Parallelization

Parameters

ContoursContoursContoursContoursContourscontours (input_object)  xld_cont(-array) objectHXLDContHXLDContHXLDContHXLDContXHobject

Input contours.

ContoursProjTransContoursProjTransContoursProjTransContoursProjTransContoursProjTranscontoursProjTrans (output_object)  xld_cont(-array) objectHXLDContHXLDContHXLDContHXLDContXHobject *

Output contours.

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

Homogeneous projective transformation matrix.

Possible Predecessors

vector_to_proj_hom_mat2dvector_to_proj_hom_mat2dVectorToProjHomMat2dvector_to_proj_hom_mat2dVectorToProjHomMat2dVectorToProjHomMat2d, hom_vector_to_proj_hom_mat2dhom_vector_to_proj_hom_mat2dHomVectorToProjHomMat2dhom_vector_to_proj_hom_mat2dHomVectorToProjHomMat2dHomVectorToProjHomMat2d, proj_match_points_ransacproj_match_points_ransacProjMatchPointsRansacproj_match_points_ransacProjMatchPointsRansacProjMatchPointsRansac, proj_match_points_ransac_guidedproj_match_points_ransac_guidedProjMatchPointsRansacGuidedproj_match_points_ransac_guidedProjMatchPointsRansacGuidedProjMatchPointsRansacGuided, hom_mat3d_projecthom_mat3d_projectHomMat3dProjecthom_mat3d_projectHomMat3dProjectHomMat3dProject

See also

projective_trans_imageprojective_trans_imageProjectiveTransImageprojective_trans_imageProjectiveTransImageProjectiveTransImage, projective_trans_image_sizeprojective_trans_image_sizeProjectiveTransImageSizeprojective_trans_image_sizeProjectiveTransImageSizeProjectiveTransImageSize, projective_trans_regionprojective_trans_regionProjectiveTransRegionprojective_trans_regionProjectiveTransRegionProjectiveTransRegion, projective_trans_point_2dprojective_trans_point_2dProjectiveTransPoint2dprojective_trans_point_2dProjectiveTransPoint2dProjectiveTransPoint2d, projective_trans_pixelprojective_trans_pixelProjectiveTransPixelprojective_trans_pixelProjectiveTransPixelProjectiveTransPixel

Module

Foundation


ClassesClassesClassesClasses | | | | Operators