polar_trans_region_invpolar_trans_region_invPolarTransRegionInvPolarTransRegionInvpolar_trans_region_inv (Operator)

Name

polar_trans_region_invpolar_trans_region_invPolarTransRegionInvPolarTransRegionInvpolar_trans_region_inv — Transform a region in polar coordinates back to Cartesian coordinates.

Signature

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   ( Windows only)

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

Description

polar_trans_region_invpolar_trans_region_invPolarTransRegionInvPolarTransRegionInvPolarTransRegionInvpolar_trans_region_inv transforms the polar coordinate representation of a region, stored in PolarRegionPolarRegionPolarRegionPolarRegionpolarRegionpolar_region, back onto an annular arc in Cartesian coordinates, described by the radii RadiusStartRadiusStartRadiusStartRadiusStartradiusStartradius_start and RadiusEndRadiusEndRadiusEndRadiusEndradiusEndradius_end and the angles AngleStartAngleStartAngleStartAngleStartangleStartangle_start and AngleEndAngleEndAngleEndAngleEndangleEndangle_end with the center point located at (RowRowRowRowrowrow, ColumnColumnColumnColumncolumncolumn). All of these values can be chosen as real numbers. In addition, the dimensions of the virtual image containing the region PolarRegionPolarRegionPolarRegionPolarRegionpolarRegionpolar_region must be given in WidthInWidthInWidthInWidthInwidthInwidth_in and HeightInHeightInHeightInHeightInheightInheight_in. WidthInWidthInWidthInWidthInwidthInwidth_in-1 is the column coordinate corresponding to AngleEndAngleEndAngleEndAngleEndangleEndangle_end and HeightInHeightInHeightInHeightInheightInheight_in-1 is the row coordinate corresponding to RadiusEndRadiusEndRadiusEndRadiusEndradiusEndradius_end. AngleStartAngleStartAngleStartAngleStartangleStartangle_start and RadiusStartRadiusStartRadiusStartRadiusStartradiusStartradius_start correspond to column and row coordinate 0. Furthermore, the dimensions WidthWidthWidthWidthwidthwidth and HeightHeightHeightHeightheightheight of the virtual output image containing the transformed region XYTransRegionXYTransRegionXYTransRegionXYTransRegionXYTransRegionxytrans_region are required.

The angles and radii are inclusive, which means that the row coordinate 0 in PolarRegionPolarRegionPolarRegionPolarRegionpolarRegionpolar_region will be mapped onto a a circle with a distance of RadiusStartRadiusStartRadiusStartRadiusStartradiusStartradius_start pixels from the specified center and the row with the coordinate HeightInHeightInHeightInHeightInheightInheight_in-1 will be mapped onto a circle of radius RadiusEndRadiusEndRadiusEndRadiusEndradiusEndradius_end. This applies to AngleStartAngleStartAngleStartAngleStartangleStartangle_start, AngleEndAngleEndAngleEndAngleEndangleEndangle_end, and WidthInWidthInWidthInWidthInwidthInwidth_in in an analogous way. If the width of the input region PolarRegionPolarRegionPolarRegionPolarRegionpolarRegionpolar_region corresponds to an angle interval greater than 2pi, the region is cropped such that length of this interval is 2pi.

The parameter InterpolationInterpolationInterpolationInterpolationinterpolationinterpolation is used to select the interpolation method 'bilinear'"bilinear""bilinear""bilinear""bilinear""bilinear" or 'nearest_neighbor'"nearest_neighbor""nearest_neighbor""nearest_neighbor""nearest_neighbor""nearest_neighbor". Setting InterpolationInterpolationInterpolationInterpolationinterpolationinterpolation to 'bilinear'"bilinear""bilinear""bilinear""bilinear""bilinear" leads to smoother region boundaries, especially if regions are enlarged. However, the runtime increases significantly.

polar_trans_region_invpolar_trans_region_invPolarTransRegionInvPolarTransRegionInvPolarTransRegionInvpolar_trans_region_inv is the inverse function of polar_trans_regionpolar_trans_regionPolarTransRegionPolarTransRegionPolarTransRegionpolar_trans_region.

The call sequence:
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")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")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")
returns the region RegionRegionRegionRegionregionregion, restricted to the circle around (RowRowRowRowrowrow, ColumnColumnColumnColumncolumncolumn) with radius RadiusRadiusRadiusRadiusradiusradius, as its output region XYTransRegionXYTransRegionXYTransRegionXYTransRegionXYTransRegionxytrans_region.

If more than one region is passed in PolarRegionPolarRegionPolarRegionPolarRegionpolarRegionpolar_region, their Cartesian transformations are computed individually and stored as a tuple in XYTransRegionXYTransRegionXYTransRegionXYTransRegionXYTransRegionxytrans_region. Please note that the indices of an input region and its transformation only correspond if the system variable 'store_empty_regions'"store_empty_regions""store_empty_regions""store_empty_regions""store_empty_regions""store_empty_regions" is set to 'false'"false""false""false""false""false" (see set_systemset_systemSetSystemSetSystemSetSystemset_system). Otherwise empty output regions are discarded and the length of the input tuple PolarRegionPolarRegionPolarRegionPolarRegionpolarRegionpolar_region is most likely not equal to the length of the output tuple XYTransRegionXYTransRegionXYTransRegionXYTransRegionXYTransRegionxytrans_region.

Further Information

For an explanation of the different 2D coordinate systems used in HALCON, see the introduction of chapter Transformations / 2D Transformations.

Attention

If WidthWidthWidthWidthwidthwidth or HeightHeightHeightHeightheightheight are chosen greater than the dimensions of the current image, the system variable 'clip_region'"clip_region""clip_region""clip_region""clip_region""clip_region" should be set to 'false'"false""false""false""false""false" (see set_systemset_systemSetSystemSetSystemSetSystemset_system). Otherwise, an output region that does not lie within the dimensions of the current image can produce an error message.

Execution Information

Parameters

PolarRegionPolarRegionPolarRegionPolarRegionpolarRegionpolar_region (input_object)  region(-array) objectHRegionHObjectHRegionHobject

Input region.

XYTransRegionXYTransRegionXYTransRegionXYTransRegionXYTransRegionxytrans_region (output_object)  region(-array) objectHRegionHObjectHRegionHobject *

Output region.

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

Row coordinate of the center of the arc.

Default: 256

Suggested values: 0, 16, 32, 64, 128, 240, 256, 480, 512

Value range: -131068 ≤ Row Row Row Row row row ≤ 131068

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

Column coordinate of the center of the arc.

Default: 256

Suggested values: 0, 16, 32, 64, 128, 256, 320, 512, 640

Value range: -131068 ≤ Column Column Column Column column column ≤ 131068

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

Angle of the ray to map the column coordinate 0 of PolarRegionPolarRegionPolarRegionPolarRegionpolarRegionpolar_region to.

Default: 0.0

Suggested values: 0.0, 0.78539816, 1.57079632, 3.141592654, 6.2831853

Value range: -6.2831853 ≤ AngleStart AngleStart AngleStart AngleStart angleStart angle_start ≤ 6.2831853

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

Angle of the ray to map the column coordinate WidthInWidthInWidthInWidthInwidthInwidth_in-1 of PolarRegionPolarRegionPolarRegionPolarRegionpolarRegionpolar_region to.

Default: 6.2831853

Suggested values: 0.0, 0.78539816, 1.57079632, 3.141592654, 6.2831853

Value range: -6.2831853 ≤ AngleEnd AngleEnd AngleEnd AngleEnd angleEnd angle_end ≤ 6.2831853

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

Radius of the circle to map the row coordinate 0 of PolarRegionPolarRegionPolarRegionPolarRegionpolarRegionpolar_region to.

Default: 0

Suggested values: 0, 16, 32, 64, 100, 128, 256, 512

Value range: 0 ≤ RadiusStart RadiusStart RadiusStart RadiusStart radiusStart radius_start ≤ 32767

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

Radius of the circle to map the row coordinate HeightInHeightInHeightInHeightInheightInheight_in-1 of PolarRegionPolarRegionPolarRegionPolarRegionpolarRegionpolar_region to.

Default: 100

Suggested values: 0, 16, 32, 64, 100, 128, 256, 512

Value range: 0 ≤ RadiusEnd RadiusEnd RadiusEnd RadiusEnd radiusEnd radius_end ≤ 32767

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

Width of the virtual input image.

Default: 512

Suggested values: 256, 320, 512, 640, 800, 1024

Value range: 2 ≤ WidthIn WidthIn WidthIn WidthIn widthIn width_in ≤ 32767

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

Height of the virtual input image.

Default: 512

Suggested values: 240, 256, 480, 512, 600, 1024

Value range: 2 ≤ HeightIn HeightIn HeightIn HeightIn heightIn height_in ≤ 32767

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

Width of the virtual output image.

Default: 512

Suggested values: 256, 320, 512, 640, 800, 1024

Value range: 1 ≤ Width Width Width Width width width ≤ 32767

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

Height of the virtual output image.

Default: 512

Suggested values: 240, 256, 480, 512, 600, 1024

Value range: 1 ≤ Height Height Height Height height height ≤ 32767

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

Interpolation method for the transformation.

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

List of values: 'bilinear'"bilinear""bilinear""bilinear""bilinear""bilinear", 'nearest_neighbor'"nearest_neighbor""nearest_neighbor""nearest_neighbor""nearest_neighbor""nearest_neighbor"

See also

polar_trans_image_extpolar_trans_image_extPolarTransImageExtPolarTransImageExtPolarTransImageExtpolar_trans_image_ext, polar_trans_image_invpolar_trans_image_invPolarTransImageInvPolarTransImageInvPolarTransImageInvpolar_trans_image_inv, polar_trans_regionpolar_trans_regionPolarTransRegionPolarTransRegionPolarTransRegionpolar_trans_region, polar_trans_contour_xldpolar_trans_contour_xldPolarTransContourXldPolarTransContourXldPolarTransContourXldpolar_trans_contour_xld, polar_trans_contour_xld_invpolar_trans_contour_xld_invPolarTransContourXldInvPolarTransContourXldInvPolarTransContourXldInvpolar_trans_contour_xld_inv

Module

Foundation