Skip to content

polar_trans_contour_xldpolar_trans_contour_xldPolarTransContourXldPolarTransContourXldpolar_trans_contour_xldpolar_trans_contour_xld🔗

Short description🔗

polar_trans_contour_xldpolar_trans_contour_xldPolarTransContourXldPolarTransContourXldpolar_trans_contour_xldpolar_trans_contour_xld — Transform a contour in an annular arc to polar coordinates.

Signature🔗

polar_trans_contour_xld( xld_cont Contour, out xld_cont PolarTransContour, number Row, number Column, angle.rad AngleStart, angle.rad AngleEnd, number RadiusStart, number RadiusEnd, extent.x Width, extent.y Height )polar_trans_contour_xld( Contour : PolarTransContour : Row, Column, AngleStart, AngleEnd, RadiusStart, RadiusEnd, Width, Height : )void PolarTransContourXld( const HObject& Contour, HObject* PolarTransContour, const HTuple& Row, const HTuple& Column, const HTuple& AngleStart, const HTuple& AngleEnd, const HTuple& RadiusStart, const HTuple& RadiusEnd, const HTuple& Width, const HTuple& Height )static void HOperatorSet.PolarTransContourXld( HObject contour, out HObject polarTransContour, HTuple row, HTuple column, HTuple angleStart, HTuple angleEnd, HTuple radiusStart, HTuple radiusEnd, HTuple width, HTuple height )def polar_trans_contour_xld( contour: 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: int, height: int ) -> HObject

Herror polar_trans_contour_xld( const Hobject Contour, Hobject* PolarTransContour, double Row, double Column, double AngleStart, double AngleEnd, double RadiusStart, double RadiusEnd, const Hlong Width, const Hlong Height )

Herror T_polar_trans_contour_xld( const Hobject Contour, Hobject* PolarTransContour, const Htuple Row, const Htuple Column, const Htuple AngleStart, const Htuple AngleEnd, const Htuple RadiusStart, const Htuple RadiusEnd, const Htuple Width, const Htuple Height )

HXLDCont HXLDCont::PolarTransContourXld( const HTuple& Row, const HTuple& Column, double AngleStart, double AngleEnd, const HTuple& RadiusStart, const HTuple& RadiusEnd, Hlong Width, Hlong Height ) const

HXLDCont HXLDCont::PolarTransContourXld( double Row, double Column, double AngleStart, double AngleEnd, double RadiusStart, double RadiusEnd, Hlong Width, Hlong Height ) const

HXLDCont HXLDCont.PolarTransContourXld( HTuple row, HTuple column, double angleStart, double angleEnd, HTuple radiusStart, HTuple radiusEnd, int width, int height )

HXLDCont HXLDCont.PolarTransContourXld( double row, double column, double angleStart, double angleEnd, double radiusStart, double radiusEnd, int width, int height )

Description🔗

polar_trans_contour_xldPolarTransContourXld transforms the Contourcontourcontour in the annular arc specified by the center point (Rowrowrow, Columncolumncolumn), the radii RadiusStartradiusStartradius_start and RadiusEndradiusEndradius_end and the angles AngleStartangleStartangle_start and AngleEndangleEndangle_end to its polar coordinate version PolarTransContourpolarTransContourpolar_trans_contour in the virtual image of the dimensions Widthwidthwidth x Heightheightheight. The output contour is cropped at the borders of this virtual image.

The coordinate (0,0) in the output contour always corresponds to the contour point specified by RadiusStartradiusStartradius_start and AngleStartangleStartangle_start. Analogously, the coordinate (\(\textrm{Height}-1\),\(\textrm{Width}-1\)) in the output contour always corresponds to the point in the contour that is specified by RadiusEndradiusEndradius_end and AngleEndangleEndangle_end, even if the contour does not contain these points. In the usual mode (AngleStartangleStartangle_start \(<\) AngleEndangleEndangle_end and RadiusStartradiusStartradius_start \(<\) RadiusEndradiusEndradius_end), the polar transformation is performed in the mathematically positive orientation (counterclockwise). Furthermore, contour points with smaller radii lie in the upper part of the output contour. By suitably exchanging the values of these parameters (e.g., AngleStartangleStartangle_start \(>\) AngleEndangleEndangle_end or RadiusStartradiusStartradius_start \(>\) RadiusEndradiusEndradius_end), any desired orientation of the output contour PolarTransContourpolarTransContourpolar_trans_contour can be achieved.

The angles can be chosen from all real numbers. Center point and radii can be real as well.

Note that PolarTransContourpolarTransContourpolar_trans_contour can consist of more than one contour because Contourcontourcontour may be split at AngleStartangleStartangle_start respectively AngleEndangleEndangle_end or the size of the angle interval \([\textrm{AngleStart},\textrm{AngleEnd}]\) may be greater than one \(2\pi\) period.

If more than one contour is passed in Contourcontourcontour, their polar transformations are computed individually and stored as a tuple in PolarTransContourpolarTransContourpolar_trans_contour. However, since one contour may be transformed into several contours, there is no relation between the indices of the contours in the input tuple Contourcontourcontour and the indices in the output tuple PolarTransContourpolarTransContourpolar_trans_contour.

Further Information🔗

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

Attention🔗

Only the contour points are transformed. As the polar transformation is not affine, polar_trans_contour_xldPolarTransContourXld only produces reliable results if the spacing of the contour points is small. Existing attributes are not transformed.

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Automatically parallelized on tuple level.

Parameters🔗

Contourcontourcontour (input_object) xld_cont(-array) → objectobjectHObjectHXLDContHObjectHobject

Input contour.

PolarTransContourpolarTransContourpolar_trans_contour (output_object) xld_cont(-array) → objectobjectHObjectHXLDContHObjectHobject *

Output contour.

Rowrowrow (input_control) number → (real / integer)(real / integer)HTuple (double / Hlong)HTuple (double / int / long)Union[int, float]Htuple (double / Hlong)

Row coordinate of the center of the arc.

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

Columncolumncolumn (input_control) number → (real / integer)(real / integer)HTuple (double / Hlong)HTuple (double / int / long)Union[int, float]Htuple (double / Hlong)

Column coordinate of the center of the arc.

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

AngleStartangleStartangle_start (input_control) angle.rad → (real)(real)HTuple (double)HTuple (double)floatHtuple (double)

Angle of the ray to be mapped to the column coordinate 00 of PolarTransContourpolarTransContourpolar_trans_contour.

Default: 0.00.0
Suggested values: 0.0, 0.78539816, 1.57079632, 3.141592654, 6.2831853, 12.5663706160.0, 0.78539816, 1.57079632, 3.141592654, 6.2831853, 12.566370616
Value range: -6.2831853 ≤ AngleStart ≤ 6.2831853

AngleEndangleEndangle_end (input_control) angle.rad → (real)(real)HTuple (double)HTuple (double)floatHtuple (double)

Angle of the ray to be mapped to the column coordinate \(\textrm{Width}-1\) of PolarTransContourpolarTransContourpolar_trans_contour to.

Default: 6.28318536.2831853
Suggested values: 0.0, 0.78539816, 1.57079632, 3.141592654, 6.2831853, 12.5663706160.0, 0.78539816, 1.57079632, 3.141592654, 6.2831853, 12.566370616
Value range: -6.2831853 ≤ AngleEnd ≤ 6.2831853

RadiusStartradiusStartradius_start (input_control) number → (real / integer)(real / integer)HTuple (double / Hlong)HTuple (double / int / long)Union[int, float]Htuple (double / Hlong)

Radius of the circle to be mapped to the row coordinate 00 of PolarTransContourpolarTransContourpolar_trans_contour.

Default: 00
Suggested values: 0, 16, 32, 64, 100, 128, 256, 5120, 16, 32, 64, 100, 128, 256, 512
Value range: 0 ≤ RadiusStart ≤ 32767

RadiusEndradiusEndradius_end (input_control) number → (real / integer)(real / integer)HTuple (double / Hlong)HTuple (double / int / long)Union[int, float]Htuple (double / Hlong)

Radius of the circle to be mapped to the row coordinate \(\textrm{Height}-1\) of PolarTransContourpolarTransContourpolar_trans_contour.

Default: 100100
Suggested values: 0, 16, 32, 64, 100, 128, 256, 5120, 16, 32, 64, 100, 128, 256, 512
Value range: 0 ≤ RadiusEnd ≤ 32767

Widthwidthwidth (input_control) extent.x → (integer)(integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Width of the virtual output image.

Default: 512512
Suggested values: 256, 320, 512, 640, 800, 1024256, 320, 512, 640, 800, 1024
Value range: 0 ≤ Width ≤ 32767

Heightheightheight (input_control) extent.y → (integer)(integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Height of the virtual output image.

Default: 512512
Suggested values: 240, 256, 480, 512, 600, 1024240, 256, 480, 512, 600, 1024
Value range: 0 ≤ Height ≤ 32767

Combinations with other operators🔗

Combinations

See also

polar_trans_image_extPolarTransImageExt, polar_trans_image_invPolarTransImageInv, polar_trans_regionPolarTransRegion, polar_trans_region_invPolarTransRegionInv, polar_trans_contour_xld_invPolarTransContourXldInv

Module🔗

Foundation