polar_trans_region_invpolar_trans_region_invPolarTransRegionInvPolarTransRegionInvpolar_trans_region_inv (Operator)

Name

polar_trans_region_invpolar_trans_region_invPolarTransRegionInvPolarTransRegionInvpolar_trans_region_inv — Rücktransformieren einer Region in Polarkoordinaten.

Signatur

polar_trans_region_inv(PolarRegion : XYTransRegion : Row, Column, AngleStart, AngleEnd, RadiusStart, RadiusEnd, WidthIn, HeightIn, Width, Height, Interpolation : )

Herror polar_trans_region_inv(const Hobject PolarRegion, Hobject* XYTransRegion, double Row, double Column, double AngleStart, double AngleEnd, double RadiusStart, double RadiusEnd, const Hlong WidthIn, const Hlong HeightIn, const Hlong Width, const Hlong Height, const char* Interpolation)

Herror T_polar_trans_region_inv(const Hobject PolarRegion, Hobject* XYTransRegion, const Htuple Row, const Htuple Column, const Htuple AngleStart, const Htuple AngleEnd, const Htuple RadiusStart, const Htuple RadiusEnd, const Htuple WidthIn, const Htuple HeightIn, const Htuple Width, const Htuple Height, const Htuple Interpolation)

void PolarTransRegionInv(const HObject& PolarRegion, HObject* XYTransRegion, const HTuple& Row, const HTuple& Column, const HTuple& AngleStart, const HTuple& AngleEnd, const HTuple& RadiusStart, const HTuple& RadiusEnd, const HTuple& WidthIn, const HTuple& HeightIn, const HTuple& Width, const HTuple& Height, const HTuple& Interpolation)

HRegion HRegion::PolarTransRegionInv(const HTuple& Row, const HTuple& Column, double AngleStart, double AngleEnd, const HTuple& RadiusStart, const HTuple& RadiusEnd, Hlong WidthIn, Hlong HeightIn, Hlong Width, Hlong Height, const HString& Interpolation) const

HRegion HRegion::PolarTransRegionInv(double Row, double Column, double AngleStart, double AngleEnd, double RadiusStart, double RadiusEnd, Hlong WidthIn, Hlong HeightIn, Hlong Width, Hlong Height, const HString& Interpolation) const

HRegion HRegion::PolarTransRegionInv(double Row, double Column, double AngleStart, double AngleEnd, double RadiusStart, double RadiusEnd, Hlong WidthIn, Hlong HeightIn, Hlong Width, Hlong Height, const char* Interpolation) const

HRegion HRegion::PolarTransRegionInv(double Row, double Column, double AngleStart, double AngleEnd, double RadiusStart, double RadiusEnd, Hlong WidthIn, Hlong HeightIn, Hlong Width, Hlong Height, const wchar_t* Interpolation) const   ( Nur Windows)

static void HOperatorSet.PolarTransRegionInv(HObject polarRegion, out HObject XYTransRegion, HTuple row, HTuple column, HTuple angleStart, HTuple angleEnd, HTuple radiusStart, HTuple radiusEnd, HTuple widthIn, HTuple heightIn, HTuple width, HTuple height, HTuple interpolation)

HRegion HRegion.PolarTransRegionInv(HTuple row, HTuple column, double angleStart, double angleEnd, HTuple radiusStart, HTuple radiusEnd, int widthIn, int heightIn, int width, int height, string interpolation)

HRegion HRegion.PolarTransRegionInv(double row, double column, double angleStart, double angleEnd, double radiusStart, double radiusEnd, int widthIn, int heightIn, int width, int height, string interpolation)

def polar_trans_region_inv(polar_region: HObject, row: Union[int, float], column: Union[int, float], angle_start: float, angle_end: float, radius_start: Union[int, float], radius_end: Union[int, float], width_in: int, height_in: int, width: int, height: int, interpolation: str) -> HObject

Beschreibung

polar_trans_region_invpolar_trans_region_invPolarTransRegionInvPolarTransRegionInvpolar_trans_region_inv transformiert die Polarkoordinatendarstellung einer Region, gespeichert in PolarRegionPolarRegionPolarRegionpolarRegionpolar_region, zurück auf einen Kreisring in kartesischen Koordinaten, der durch die Radien RadiusStartRadiusStartRadiusStartradiusStartradius_start und RadiusEndRadiusEndRadiusEndradiusEndradius_end sowie durch die Winkel AngleStartAngleStartAngleStartangleStartangle_start und AngleEndAngleEndAngleEndangleEndangle_end beschrieben ist und dessen Mittelpunkt in (RowRowRowrowrow, ColumnColumnColumncolumncolumn) liegt. Alle diese Werte können frei aus den reellen Zahlen gewählt werden. Zusätzlich müssen die Dimensionen des virtuellen Eingabebildes, welches die Region PolarRegionPolarRegionPolarRegionpolarRegionpolar_region enthält, in WidthInWidthInWidthInwidthInwidth_in und HeightInHeightInHeightInheightInheight_in übergeben werden. WidthInWidthInWidthInwidthInwidth_in-1 ist die Spaltenkoordinate, die AngleEndAngleEndAngleEndangleEndangle_end entspricht, und HeightInHeightInHeightInheightInheight_in-1 ist die Zeilenkoordinate, die RadiusEndRadiusEndRadiusEndradiusEndradius_end entspricht. AngleStartAngleStartAngleStartangleStartangle_start bzw. RadiusStartRadiusStartRadiusStartradiusStartradius_start entspricht der Spalten- bzw. Zeilenkoordinate 0. Außerdem müssen die Dimensionen des virtuellen Ausgabebildes, welches die Region XYTransRegionXYTransRegionXYTransRegionXYTransRegionxytrans_region enthält, in WidthWidthWidthwidthwidth und HeightHeightHeightheightheight übergeben werden.

Die Winkel und Radien sind inklusive, die Zeile mit der Koordinate 0 der Eingaberegion wird also auf einen Kreis im Abstand RadiusStartRadiusStartRadiusStartradiusStartradius_start vom angegebenen Mittelpunkt abgebildet, die Zeile mit der Koordinate HeightInHeightInHeightInheightInheight_in-1 auf einen Kreis im Abstand RadiusEndRadiusEndRadiusEndradiusEndradius_end. Das Gleiche gilt für AngleStartAngleStartAngleStartangleStartangle_start, AngleEndAngleEndAngleEndangleEndangle_end und WidthInWidthInWidthInwidthInwidth_in. Entspricht die Breite der Eingaberegion einem Winkelintervall, dessen Länge größer als 2pi ist, wird die Eingaberegion so beschnitten, dass die Länge dieses Intervalls 2pi ist.

Über den Parameter InterpolationInterpolationInterpolationinterpolationinterpolation kann dabei zwischen den Interpolationsverfahren 'bilinear'"bilinear""bilinear""bilinear""bilinear" und 'nearest_neighbor'"nearest_neighbor""nearest_neighbor""nearest_neighbor""nearest_neighbor" gewählt werden. Die Wahl InterpolationInterpolationInterpolationinterpolationinterpolation = 'bilinear'"bilinear""bilinear""bilinear""bilinear" kann insbesondere bei Vergrößerungen zu glatteren Regionenrändern führen. Allerdings steigt dadurch die Laufzeit signifikant an.

polar_trans_region_invpolar_trans_region_invPolarTransRegionInvPolarTransRegionInvpolar_trans_region_inv ist die exakte Umkehrfunktion zu polar_trans_regionpolar_trans_regionPolarTransRegionPolarTransRegionpolar_trans_region.

Die Aufrufsequenz:
polar_trans_region(Region, PolarRegion, Row, Column, rad(360), 0, 0, Radius, Width, Height, 'nearest_neighbor')polar_trans_region(Region, PolarRegion, Row, Column, rad(360), 0, 0, Radius, Width, Height, "nearest_neighbor")PolarTransRegion(Region, PolarRegion, Row, Column, rad(360), 0, 0, Radius, Width, Height, "nearest_neighbor")PolarTransRegion(Region, PolarRegion, Row, Column, rad(360), 0, 0, Radius, Width, Height, "nearest_neighbor")polar_trans_region(Region, PolarRegion, Row, Column, rad(360), 0, 0, Radius, Width, Height, "nearest_neighbor")
polar_trans_region_inv(PolarRegion, XYTransRegion, Row, Column, rad(360), 0, 0, Radius, Width, Height, Width, Height, 'nearest_neighbor')polar_trans_region_inv(PolarRegion, XYTransRegion, Row, Column, rad(360), 0, 0, Radius, Width, Height, Width, Height, "nearest_neighbor")PolarTransRegionInv(PolarRegion, XYTransRegion, Row, Column, rad(360), 0, 0, Radius, Width, Height, Width, Height, "nearest_neighbor")PolarTransRegionInv(PolarRegion, XYTransRegion, Row, Column, rad(360), 0, 0, Radius, Width, Height, Width, Height, "nearest_neighbor")polar_trans_region_inv(PolarRegion, XYTransRegion, Row, Column, rad(360), 0, 0, Radius, Width, Height, Width, Height, "nearest_neighbor")
liefert in der Ausgaberegion XYTransRegionXYTransRegionXYTransRegionXYTransRegionxytrans_region die Region RegionRegionRegionregionregion eingeschränkt auf den Kreis um (RowRowRowrowrow,ColumnColumnColumncolumncolumn) mit Radius RadiusRadiusRadiusradiusradius zurück.

Werden mehrere Regionen in PolarRegionPolarRegionPolarRegionpolarRegionpolar_region übergeben, werden deren Transformationen individuell berechnet und als Tupel in XYTransRegionXYTransRegionXYTransRegionXYTransRegionxytrans_region abgespeichert. Dabei entsprechen die Indizes von Ein- und Ausgaberegionen nur dann einander, wenn die Systemvariable 'store_empty_regions'"store_empty_regions""store_empty_regions""store_empty_regions""store_empty_regions" auf 'true'"true""true""true""true" gesetzt wird (siehe auch set_systemset_systemSetSystemSetSystemset_system). Sonst werden leere Regionen nicht zurückgegeben und deshalb entspricht die Länge des Ausgabetupels XYTransRegionXYTransRegionXYTransRegionXYTransRegionxytrans_region im Allgemeinen nicht der Länge des Eingabetupels PolarRegionPolarRegionPolarRegionpolarRegionpolar_region.

Weitere Informationen

Ein Überblick zu den verschiedenen in HALCON verwendeten 2D Koordinatensystemen ist in der Einleitung zum Kapitel Transformationen / 2D-Transformationen gegeben.

Achtung

Werden die Dimensionen des virtuellen Ausgabebildes WidthWidthWidthwidthwidth und HeightHeightHeightheightheight größer als die Dimensionen des aktuellen Bildes gewählt, sollte die Systemvariable 'clip_region'"clip_region""clip_region""clip_region""clip_region" auf 'false'"false""false""false""false" gesetzt werden (siehe auch set_systemset_systemSetSystemSetSystemset_system). Andernfalls kann eine Ausgaberegion, die nicht innerhalb der Dimensionen des aktuellen Bildes liegt, zu einer Fehlermeldung führen.

Ausführungsinformationen

Parameter

PolarRegionPolarRegionPolarRegionpolarRegionpolar_region (input_object)  region(-array) objectHRegionHObjectHObjectHobject

Eingaberegion.

XYTransRegionXYTransRegionXYTransRegionXYTransRegionxytrans_region (output_object)  region(-array) objectHRegionHObjectHObjectHobject *

Ergebnisregion.

RowRowRowrowrow (input_control)  number HTupleUnion[int, float]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Zeilenkoordinate des Kreismittelpunktes.

Default: 256

Wertevorschläge: 0, 16, 32, 64, 128, 240, 256, 480, 512

Wertebereich: -131068 ≤ Row Row Row row row ≤ 131068

ColumnColumnColumncolumncolumn (input_control)  number HTupleUnion[int, float]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Spaltenkoordinate des Kreismittelpunktes.

Default: 256

Wertevorschläge: 0, 16, 32, 64, 128, 256, 320, 512, 640

Wertebereich: -131068 ≤ Column Column Column column column ≤ 131068

AngleStartAngleStartAngleStartangleStartangle_start (input_control)  angle.rad HTuplefloatHTupleHtuple (real) (double) (double) (double)

Winkel, auf den die Spaltenkoordinate 0 von PolarRegionPolarRegionPolarRegionpolarRegionpolar_region abgebildet wird.

Default: 0.0

Wertevorschläge: 0.0, 0.78539816, 1.57079632, 3.141592654, 6.2831853

Wertebereich: -6.2831853 ≤ AngleStart AngleStart AngleStart angleStart angle_start ≤ 6.2831853

AngleEndAngleEndAngleEndangleEndangle_end (input_control)  angle.rad HTuplefloatHTupleHtuple (real) (double) (double) (double)

Winkel, auf den die Spaltenkoordinate WidthInWidthInWidthInwidthInwidth_in -1 in PolarRegionPolarRegionPolarRegionpolarRegionpolar_region abgebildet wird.

Default: 6.2831853

Wertevorschläge: 0.0, 0.78539816, 1.57079632, 3.141592654, 6.2831853

Wertebereich: -6.2831853 ≤ AngleEnd AngleEnd AngleEnd angleEnd angle_end ≤ 6.2831853

RadiusStartRadiusStartRadiusStartradiusStartradius_start (input_control)  number HTupleUnion[int, float]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Kreisradius, auf den die Zeilenkoordinate 0 in PolarRegionPolarRegionPolarRegionpolarRegionpolar_region abgebildet wird.

Default: 0

Wertevorschläge: 0, 16, 32, 64, 100, 128, 256, 512

Wertebereich: 0 ≤ RadiusStart RadiusStart RadiusStart radiusStart radius_start ≤ 32767

RadiusEndRadiusEndRadiusEndradiusEndradius_end (input_control)  number HTupleUnion[int, float]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Kreisradius, auf den die Zeilenkoordinate HeightInHeightInHeightInheightInheight_in-1 in PolarRegionPolarRegionPolarRegionpolarRegionpolar_region abgebildet wird.

Default: 100

Wertevorschläge: 0, 16, 32, 64, 100, 128, 256, 512

Wertebereich: 0 ≤ RadiusEnd RadiusEnd RadiusEnd radiusEnd radius_end ≤ 32767

WidthInWidthInWidthInwidthInwidth_in (input_control)  extent.x HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Breite des virtuellen Eingabebildes.

Default: 512

Wertevorschläge: 256, 320, 512, 640, 800, 1024

Wertebereich: 2 ≤ WidthIn WidthIn WidthIn widthIn width_in ≤ 32767

HeightInHeightInHeightInheightInheight_in (input_control)  extent.y HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Höhe des virtuellen Eingabebildes.

Default: 512

Wertevorschläge: 240, 256, 480, 512, 600, 1024

Wertebereich: 2 ≤ HeightIn HeightIn HeightIn heightIn height_in ≤ 32767

WidthWidthWidthwidthwidth (input_control)  extent.x HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Breite des virtuellen Zielbildes.

Default: 512

Wertevorschläge: 256, 320, 512, 640, 800, 1024

Wertebereich: 1 ≤ Width Width Width width width ≤ 32767

HeightHeightHeightheightheight (input_control)  extent.y HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Höhe des virtuellen Zielbildes.

Default: 512

Wertevorschläge: 240, 256, 480, 512, 600, 1024

Wertebereich: 1 ≤ Height Height Height height height ≤ 32767

InterpolationInterpolationInterpolationinterpolationinterpolation (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Interpolationsverfahren für die Transformation.

Default: 'nearest_neighbor' "nearest_neighbor" "nearest_neighbor" "nearest_neighbor" "nearest_neighbor"

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

Siehe auch

polar_trans_image_extpolar_trans_image_extPolarTransImageExtPolarTransImageExtpolar_trans_image_ext, polar_trans_image_invpolar_trans_image_invPolarTransImageInvPolarTransImageInvpolar_trans_image_inv, polar_trans_regionpolar_trans_regionPolarTransRegionPolarTransRegionpolar_trans_region, polar_trans_contour_xldpolar_trans_contour_xldPolarTransContourXldPolarTransContourXldpolar_trans_contour_xld, polar_trans_contour_xld_invpolar_trans_contour_xld_invPolarTransContourXldInvPolarTransContourXldInvpolar_trans_contour_xld_inv

Modul

Foundation