polar_trans_contour_xld_invpolar_trans_contour_xld_invPolarTransContourXldInvPolarTransContourXldInvpolar_trans_contour_xld_inv (Operator)

Name

polar_trans_contour_xld_invpolar_trans_contour_xld_invPolarTransContourXldInvPolarTransContourXldInvpolar_trans_contour_xld_inv — Transform a contour in polar coordinates back to Cartesian coordinates

Signature

polar_trans_contour_xld_inv(PolarContour : XYTransContour : Row, Column, AngleStart, AngleEnd, RadiusStart, RadiusEnd, WidthIn, HeightIn, Width, Height : )

Herror polar_trans_contour_xld_inv(const Hobject PolarContour, Hobject* XYTransContour, double Row, double Column, double AngleStart, double AngleEnd, double RadiusStart, double RadiusEnd, const Hlong WidthIn, const Hlong HeightIn, const Hlong Width, const Hlong Height)

Herror T_polar_trans_contour_xld_inv(const Hobject PolarContour, Hobject* XYTransContour, 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)

void PolarTransContourXldInv(const HObject& PolarContour, HObject* XYTransContour, 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)

HXLDCont HXLDCont::PolarTransContourXldInv(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

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

static void HOperatorSet.PolarTransContourXldInv(HObject polarContour, out HObject XYTransContour, HTuple row, HTuple column, HTuple angleStart, HTuple angleEnd, HTuple radiusStart, HTuple radiusEnd, HTuple widthIn, HTuple heightIn, HTuple width, HTuple height)

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

HXLDCont HXLDCont.PolarTransContourXldInv(double row, double column, double angleStart, double angleEnd, double radiusStart, double radiusEnd, int widthIn, int heightIn, int width, int height)

def polar_trans_contour_xld_inv(polar_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_in: int, height_in: int, width: int, height: int) -> HObject

Description

polar_trans_contour_xld_invpolar_trans_contour_xld_invPolarTransContourXldInvPolarTransContourXldInvpolar_trans_contour_xld_inv transforms the polar coordinate representation of a contour, stored in PolarContourPolarContourPolarContourpolarContourpolar_contour, back onto an annular arc in Cartesian coordinates, described by the radii RadiusStartRadiusStartRadiusStartradiusStartradius_start and RadiusEndRadiusEndRadiusEndradiusEndradius_end and the angles AngleStartAngleStartAngleStartangleStartangle_start and AngleEndAngleEndAngleEndangleEndangle_end with the center point located at (RowRowRowrowrow, ColumnColumnColumncolumncolumn). All of these values can be chosen as real numbers. In addition, the dimensions of the virtual image containing the contour PolarContourPolarContourPolarContourpolarContourpolar_contour must be given in WidthInWidthInWidthInwidthInwidth_in and HeightInHeightInHeightInheightInheight_in. WidthInWidthInWidthInwidthInwidth_in-1 is the column coordinate corresponding to AngleEndAngleEndAngleEndangleEndangle_end and HeightInHeightInHeightInheightInheight_in-1 is the row coordinate corresponding to RadiusEndRadiusEndRadiusEndradiusEndradius_end. AngleStartAngleStartAngleStartangleStartangle_start and RadiusStartRadiusStartRadiusStartradiusStartradius_start correspond to column and row coordinate 0. Furthermore, the dimensions WidthWidthWidthwidthwidth and HeightHeightHeightheightheight of the virtual output image containing the transformed contour XYTransContourXYTransContourXYTransContourXYTransContourxytrans_contour are required. The output contour is cropped at the borders of this virtual output image.

polar_trans_contour_xld_invpolar_trans_contour_xld_invPolarTransContourXldInvPolarTransContourXldInvpolar_trans_contour_xld_inv is the inverse function of polar_trans_contour_xldpolar_trans_contour_xldPolarTransContourXldPolarTransContourXldpolar_trans_contour_xld.

The call sequence:
polar_trans_contour_xld(Contour, PolarContour, Row, Column, rad(360), 0, 0, Radius, Width, Height)polar_trans_contour_xld(Contour, PolarContour, Row, Column, rad(360), 0, 0, Radius, Width, Height)PolarTransContourXld(Contour, PolarContour, Row, Column, rad(360), 0, 0, Radius, Width, Height)PolarTransContourXld(Contour, PolarContour, Row, Column, rad(360), 0, 0, Radius, Width, Height)polar_trans_contour_xld(Contour, PolarContour, Row, Column, rad(360), 0, 0, Radius, Width, Height)
polar_trans_contour_xld_inv(PolarContour, XYTransContour, Row, Column, rad(360), 0, 0, Radius, Width, Height, WidthOut, HeightOut)polar_trans_contour_xld_inv(PolarContour, XYTransContour, Row, Column, rad(360), 0, 0, Radius, Width, Height, WidthOut, HeightOut)PolarTransContourXldInv(PolarContour, XYTransContour, Row, Column, rad(360), 0, 0, Radius, Width, Height, WidthOut, HeightOut)PolarTransContourXldInv(PolarContour, XYTransContour, Row, Column, rad(360), 0, 0, Radius, Width, Height, WidthOut, HeightOut)polar_trans_contour_xld_inv(PolarContour, XYTransContour, Row, Column, rad(360), 0, 0, Radius, Width, Height, WidthOut, HeightOut)
returns the contour ContourContourContourcontourcontour, restricted to the circle around (RowRowRowrowrow, ColumnColumnColumncolumncolumn) with radius RadiusRadiusRadiusradiusradius, as its output contour XYTransContourXYTransContourXYTransContourXYTransContourxytrans_contour.

Note that XYTransContourXYTransContourXYTransContourXYTransContourxytrans_contour can consist of more than one contour because PolarContourPolarContourPolarContourpolarContourpolar_contour may be cropped at the borders of the virtual output image given by WidthWidthWidthwidthwidth and HeightHeightHeightheightheight.

If more than one contour is passed in PolarContourPolarContourPolarContourpolarContourpolar_contour, their transformations are computed individually and stored as a tuple in XYTransContourXYTransContourXYTransContourXYTransContourxytrans_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 PolarContourPolarContourPolarContourpolarContourpolar_contour and the indices in the output tuple XYTransContourXYTransContourXYTransContourXYTransContourxytrans_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_xld_invpolar_trans_contour_xld_invPolarTransContourXldInvPolarTransContourXldInvpolar_trans_contour_xld_inv only produces reliable results if the spacing of the contour points is small. Existing attributes are not transformed.

Execution Information

Parameters

PolarContourPolarContourPolarContourpolarContourpolar_contour (input_object)  xld_cont(-array) objectHXLDContHObjectHObjectHobject

Input contour.

XYTransContourXYTransContourXYTransContourXYTransContourxytrans_contour (output_object)  xld_cont(-array) objectHXLDContHObjectHObjectHobject *

Output contour.

RowRowRowrowrow (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

ColumnColumnColumncolumncolumn (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

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

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

Default: 0.0

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

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

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

Angle of the ray to map the column coordinate WidthInWidthInWidthInwidthInwidth_in-1 of PolarContourPolarContourPolarContourpolarContourpolar_contour to.

Default: 6.2831853

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

Value range: -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)

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

Default: 0

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

Value range: 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)

Radius of the circle to map the row coordinate HeightInHeightInHeightInheightInheight_in-1 of PolarContourPolarContourPolarContourpolarContourpolar_contour to.

Default: 100

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

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

WidthInWidthInWidthInwidthInwidth_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: 0 ≤ WidthIn WidthIn WidthIn widthIn width_in ≤ 32767

HeightInHeightInHeightInheightInheight_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: 0 ≤ HeightIn HeightIn HeightIn heightIn height_in ≤ 32767

WidthWidthWidthwidthwidth (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: 0 ≤ Width Width Width width width ≤ 32767

HeightHeightHeightheightheight (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: 0 ≤ Height Height Height height height ≤ 32767

See also

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_region_invpolar_trans_region_invPolarTransRegionInvPolarTransRegionInvpolar_trans_region_inv, polar_trans_contour_xldpolar_trans_contour_xldPolarTransContourXldPolarTransContourXldpolar_trans_contour_xld

Module

Foundation