KlassenKlassenKlassenKlassen | | | | Operatoren

projective_trans_regionT_projective_trans_regionProjectiveTransRegionprojective_trans_regionProjectiveTransRegionProjectiveTransRegion (Operator)

Name

projective_trans_regionT_projective_trans_regionProjectiveTransRegionprojective_trans_regionProjectiveTransRegionProjectiveTransRegion — Anwenden einer projektiven Transformation auf eine Region.

Signatur

projective_trans_region(Regions : TransRegions : HomMat2D, Interpolation : )

Herror T_projective_trans_region(const Hobject Regions, Hobject* TransRegions, const Htuple HomMat2D, const Htuple Interpolation)

Herror projective_trans_region(Hobject Regions, Hobject* TransRegions, const HTuple& HomMat2D, const HTuple& Interpolation)

HRegion HRegion::ProjectiveTransRegion(const HTuple& HomMat2D, const HTuple& Interpolation) const

HRegionArray HRegionArray::ProjectiveTransRegion(const HTuple& HomMat2D, const HTuple& Interpolation) const

void ProjectiveTransRegion(const HObject& Regions, HObject* TransRegions, const HTuple& HomMat2D, const HTuple& Interpolation)

HRegion HRegion::ProjectiveTransRegion(const HHomMat2D& HomMat2D, const HString& Interpolation) const

HRegion HRegion::ProjectiveTransRegion(const HHomMat2D& HomMat2D, const char* Interpolation) const

HRegion HHomMat2D::ProjectiveTransRegion(const HRegion& Regions, const HString& Interpolation) const

HRegion HHomMat2D::ProjectiveTransRegion(const HRegion& Regions, const char* Interpolation) const

void HOperatorSetX.ProjectiveTransRegion(
[in] IHUntypedObjectX* Regions, [out] IHUntypedObjectX*TransRegions, [in] VARIANT HomMat2d, [in] VARIANT Interpolation)

IHRegionX* HRegionX.ProjectiveTransRegion(
[in] IHHomMat2DX* HomMat2d, [in] BSTR Interpolation)

IHRegionX* HHomMat2DX.ProjectiveTransRegion(
[in] IHRegionX* Regions, [in] BSTR Interpolation)

static void HOperatorSet.ProjectiveTransRegion(HObject regions, out HObject transRegions, HTuple homMat2D, HTuple interpolation)

HRegion HRegion.ProjectiveTransRegion(HHomMat2D homMat2D, string interpolation)

HRegion HHomMat2D.ProjectiveTransRegion(HRegion regions, string interpolation)

Beschreibung

projective_trans_regionprojective_trans_regionProjectiveTransRegionprojective_trans_regionProjectiveTransRegionProjectiveTransRegion wendet die durch die homogene Matrix HomMat2DHomMat2DHomMat2DHomMat2DHomMat2DhomMat2D beschriebene projektive Transformation auf die Regionen in RegionsRegionsRegionsRegionsRegionsregions an und liefert die Ergebnisregionen in TransRegionsTransRegionsTransRegionsTransRegionsTransRegionstransRegions zurück.

Zur Berechnung und Interpretation der Matrix siehe projective_trans_imageprojective_trans_imageProjectiveTransImageprojective_trans_imageProjectiveTransImageProjectiveTransImage.

Wird 'clip_region'"clip_region""clip_region""clip_region""clip_region""clip_region" durch set_system('clip_region', 'true')set_system("clip_region", "true")SetSystem("clip_region", "true")set_system("clip_region", "true")SetSystem("clip_region", "true")SetSystem("clip_region", "true") auf seinen Grundzustand 'true'"true""true""true""true""true" gesetzt, oder ist die Transformation entartet, erzeugt also unendlich große Regionen, so wird die Ausgaberegion durch das Rechteck mit linker oberer Ecke (0, 0) und rechter unterer Ecke ('width'"width""width""width""width""width", 'height'"height""height""height""height""height") beschnitten, wobei 'width'"width""width""width""width""width" und 'height'"height""height""height""height""height" Systemvariablen sind (siehe get_systemget_systemGetSystemget_systemGetSystemGetSystem). Falls 'clip_region'"clip_region""clip_region""clip_region""clip_region""clip_region" auf 'false'"false""false""false""false""false" gesetzt wird, so wird die Ausgaberegion nur durch die maximale unterstützte Koordinatengröße 'MAX_FORMAT'"MAX_FORMAT""MAX_FORMAT""MAX_FORMAT""MAX_FORMAT""MAX_FORMAT" beschränkt. Dies kann zu sehr speicher- und zeitintensiven Berechnungen führen, ist also mit Vorsicht zu benutzen.

Achtung

Der Transformation liegt das gleiche Koordinatensystem zugrunde, das auch bei dem Operator affine_trans_pixelaffine_trans_pixelAffineTransPixelaffine_trans_pixelAffineTransPixelAffineTransPixel verwendet wird. Das bedeutet, dass die Transformation nicht mit der Transformationsmatrix HomMat2DHomMat2DHomMat2DHomMat2DHomMat2DhomMat2D, sondern mit einer modifizierte Version davon durchgeführt wird. Eine Transformation mit projective_trans_regionprojective_trans_regionProjectiveTransRegionprojective_trans_regionProjectiveTransRegionProjectiveTransRegion entspricht für jeden Punkt (Row_i, Col_i) der Region der folgenden Kette von Transformationen (Ein- und Ausgabekoordinaten als homogene Vektoren dargestellt):

Dies kann zu unerwarteten Ergebnissen führen, wenn die Transformationsmatrix unter Verwendung von Koordinaten erstellt wurde, die von der Region mit Operatoren wie z.B. area_centerarea_centerAreaCenterarea_centerAreaCenterAreaCenter abgeleitet wurden. Wenn z.B. eine rotationssymmetrische Region unter Verwendung von hom_mat2d_rotatehom_mat2d_rotateHomMat2dRotatehom_mat2d_rotateHomMat2dRotateHomMat2dRotate um ihren mit area_centerarea_centerAreaCenterarea_centerAreaCenterAreaCenter bestimmten Schwerpunkt rotiert wird, so liegt die transformierte Region nicht auf der Originalregion. Dieser Effekt kann dadurch kompensiert werden, dass vor dem Aufruf von projective_trans_regionprojective_trans_regionProjectiveTransRegionprojective_trans_regionProjectiveTransRegionProjectiveTransRegion die Transformationsmatrix HomMat2DHomMat2DHomMat2DHomMat2DHomMat2DhomMat2D durch die beiden folgenden Translationen modifiziert wird:

  hom_mat2d_translate(HomMat2D, 0.5, 0.5, HomMat2DTmp)
  hom_mat2d_translate_local(HomMat2DTmp, -0.5, -0.5, HomMat2DAdapted)
  projective_trans_region(Region, TransRegion, HomMat2DAdapted, 'bilinear')

Parallelisierung

Parameter

RegionsRegionsRegionsRegionsRegionsregions (input_object)  region(-array) objectHRegionHRegionHRegionHRegionXHobject

Eingaberegionen.

TransRegionsTransRegionsTransRegionsTransRegionsTransRegionstransRegions (output_object)  region(-array) objectHRegionHRegionHRegionHRegionXHobject *

Ergebnisregionen.

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

Homogene projektive Transformationsmatrix.

InterpolationInterpolationInterpolationInterpolationInterpolationinterpolation (input_control)  string HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Interpolationsmethode für die Transformation.

Defaultwert: 'bilinear' "bilinear" "bilinear" "bilinear" "bilinear" "bilinear"

Werteliste: 'bilinear'"bilinear""bilinear""bilinear""bilinear""bilinear", 'nearest_neighbor'"nearest_neighbor""nearest_neighbor""nearest_neighbor""nearest_neighbor""nearest_neighbor"

Vorgänger

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

Siehe auch

projective_trans_imageprojective_trans_imageProjectiveTransImageprojective_trans_imageProjectiveTransImageProjectiveTransImage, projective_trans_image_sizeprojective_trans_image_sizeProjectiveTransImageSizeprojective_trans_image_sizeProjectiveTransImageSizeProjectiveTransImageSize, projective_trans_contour_xldprojective_trans_contour_xldProjectiveTransContourXldprojective_trans_contour_xldProjectiveTransContourXldProjectiveTransContourXld, projective_trans_point_2dprojective_trans_point_2dProjectiveTransPoint2dprojective_trans_point_2dProjectiveTransPoint2dProjectiveTransPoint2d, projective_trans_pixelprojective_trans_pixelProjectiveTransPixelprojective_trans_pixelProjectiveTransPixelProjectiveTransPixel

Modul

Foundation


KlassenKlassenKlassenKlassen | | | | Operatoren