polar_trans_contour_xldpolar_trans_contour_xldPolarTransContourXldPolarTransContourXldpolar_trans_contour_xld (算子)

名称

polar_trans_contour_xldpolar_trans_contour_xldPolarTransContourXldPolarTransContourXldpolar_trans_contour_xld — 将环形弧中的轮廓变换为极坐标。

签名

polar_trans_contour_xld(Contour : PolarTransContour : Row, Column, AngleStart, AngleEnd, RadiusStart, RadiusEnd, Width, Height : )

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)

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)

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

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)

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)

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

描述

polar_trans_contour_xldpolar_trans_contour_xldPolarTransContourXldPolarTransContourXldPolarTransContourXldpolar_trans_contour_xld transforms the ContourContourContourContourcontourcontour in the annular arc specified by the center point (RowRowRowRowrowrow, ColumnColumnColumnColumncolumncolumn), the radii RadiusStartRadiusStartRadiusStartRadiusStartradiusStartradius_start and RadiusEndRadiusEndRadiusEndRadiusEndradiusEndradius_end and the angles AngleStartAngleStartAngleStartAngleStartangleStartangle_start and AngleEndAngleEndAngleEndAngleEndangleEndangle_end to its polar coordinate version PolarTransContourPolarTransContourPolarTransContourPolarTransContourpolarTransContourpolar_trans_contour in the virtual image of the dimensions WidthWidthWidthWidthwidthwidth x HeightHeightHeightHeightheightheight. 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 RadiusStartRadiusStartRadiusStartRadiusStartradiusStartradius_start and AngleStartAngleStartAngleStartAngleStartangleStartangle_start. Analogously, the coordinate (HeightHeightHeightHeightheightheight-1,WidthWidthWidthWidthwidthwidth-1) in the output contour always corresponds to the point in the contour that is specified by RadiusEndRadiusEndRadiusEndRadiusEndradiusEndradius_end and AngleEndAngleEndAngleEndAngleEndangleEndangle_end, even if the contour does not contain these points. In the usual mode (AngleStartAngleStartAngleStartAngleStartangleStartangle_start < AngleEndAngleEndAngleEndAngleEndangleEndangle_end and RadiusStartRadiusStartRadiusStartRadiusStartradiusStartradius_start < RadiusEndRadiusEndRadiusEndRadiusEndradiusEndradius_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., AngleStartAngleStartAngleStartAngleStartangleStartangle_start > AngleEndAngleEndAngleEndAngleEndangleEndangle_end or RadiusStartRadiusStartRadiusStartRadiusStartradiusStartradius_start > RadiusEndRadiusEndRadiusEndRadiusEndradiusEndradius_end), any desired orientation of the output contour PolarTransContourPolarTransContourPolarTransContourPolarTransContourpolarTransContourpolar_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 PolarTransContourPolarTransContourPolarTransContourPolarTransContourpolarTransContourpolar_trans_contour can consist of more than one contour because ContourContourContourContourcontourcontour may be split at AngleStartAngleStartAngleStartAngleStartangleStartangle_start respectively AngleEndAngleEndAngleEndAngleEndangleEndangle_end or the size of the angle interval [AngleStartAngleStartAngleStartAngleStartangleStartangle_start,AngleEndAngleEndAngleEndAngleEndangleEndangle_end] may be greater than one 2pi period.

If more than one contour is passed in ContourContourContourContourcontourcontour, their polar transformations are computed individually and stored as a tuple in PolarTransContourPolarTransContourPolarTransContourPolarTransContourpolarTransContourpolar_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 ContourContourContourContourcontourcontour and the indices in the output tuple PolarTransContourPolarTransContourPolarTransContourPolarTransContourpolarTransContourpolar_trans_contour

更多信息

有关 HALCON 中使用的不同二维坐标系的说明,请参阅 变换 / 二维变换 一章的引言。

注意

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

执行信息

参数

ContourContourContourContourcontourcontour (输入对象)  xld_cont(-array) objectHXLDContHObjectHXLDContHobject

Input contour.

PolarTransContourPolarTransContourPolarTransContourPolarTransContourpolarTransContourpolar_trans_contour (输出对象)  xld_cont(-array) objectHXLDContHObjectHXLDContHobject *

Output contour.

RowRowRowRowrowrow (输入控制)  number HTupleUnion[int, float]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Row coordinate of the center of the arc.

默认值: 256

建议值: 0, 16, 32, 64, 128, 240, 256, 480, 512

ColumnColumnColumnColumncolumncolumn (输入控制)  number HTupleUnion[int, float]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Column coordinate of the center of the arc.

默认值: 256

建议值: 0, 16, 32, 64, 128, 256, 320, 512, 640

AngleStartAngleStartAngleStartAngleStartangleStartangle_start (输入控制)  angle.rad HTuplefloatHTupleHtuple (real) (double) (double) (double)

Angle of the ray to be mapped to the column coordinate 0 of PolarTransContourPolarTransContourPolarTransContourPolarTransContourpolarTransContourpolar_trans_contour

默认值: 0.0

建议值: 0.0, 0.78539816, 1.57079632, 3.141592654, 6.2831853, 12.566370616

值范围: -6.2831853 ≤ AngleStart AngleStart AngleStart AngleStart angleStart angle_start ≤ 6.2831853

AngleEndAngleEndAngleEndAngleEndangleEndangle_end (输入控制)  angle.rad HTuplefloatHTupleHtuple (real) (double) (double) (double)

Angle of the ray to be mapped to the column coordinate WidthWidthWidthWidthwidthwidth-1 of PolarTransContourPolarTransContourPolarTransContourPolarTransContourpolarTransContourpolar_trans_contour to.

默认值: 6.2831853

建议值: 0.0, 0.78539816, 1.57079632, 3.141592654, 6.2831853, 12.566370616

值范围: -6.2831853 ≤ AngleEnd AngleEnd AngleEnd AngleEnd angleEnd angle_end ≤ 6.2831853

RadiusStartRadiusStartRadiusStartRadiusStartradiusStartradius_start (输入控制)  number HTupleUnion[int, float]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Radius of the circle to be mapped to the row coordinate 0 of PolarTransContourPolarTransContourPolarTransContourPolarTransContourpolarTransContourpolar_trans_contour

默认值: 0

建议值: 0, 16, 32, 64, 100, 128, 256, 512

值范围: 0 ≤ RadiusStart RadiusStart RadiusStart RadiusStart radiusStart radius_start ≤ 32767

RadiusEndRadiusEndRadiusEndRadiusEndradiusEndradius_end (输入控制)  number HTupleUnion[int, float]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Radius of the circle to be mapped to the row coordinate HeightHeightHeightHeightheightheight-1 of PolarTransContourPolarTransContourPolarTransContourPolarTransContourpolarTransContourpolar_trans_contour

默认值: 100

建议值: 0, 16, 32, 64, 100, 128, 256, 512

值范围: 0 ≤ RadiusEnd RadiusEnd RadiusEnd RadiusEnd radiusEnd radius_end ≤ 32767

WidthWidthWidthWidthwidthwidth (输入控制)  extent.x HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Width of the virtual output image.

默认值: 512

建议值: 256, 320, 512, 640, 800, 1024

值范围: 0 ≤ Width Width Width Width width width ≤ 32767

HeightHeightHeightHeightheightheight (输入控制)  extent.y HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Height of the virtual output image.

默认值: 512

建议值: 240, 256, 480, 512, 600, 1024

值范围: 0 ≤ Height Height Height Height height height ≤ 32767

另见

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_region_invpolar_trans_region_invPolarTransRegionInvPolarTransRegionInvPolarTransRegionInvpolar_trans_region_inv, polar_trans_contour_xld_invpolar_trans_contour_xld_invPolarTransContourXldInvPolarTransContourXldInvPolarTransContourXldInvpolar_trans_contour_xld_inv

模块

基础