get_region_polygonT_get_region_polygonGetRegionPolygonGetRegionPolygonget_region_polygon (算子名称)

名称

get_region_polygonT_get_region_polygonGetRegionPolygonGetRegionPolygonget_region_polygon — Polygon approximation of a region.

参数签名

get_region_polygon(区域 : : Tolerance : Rows, Columns)

Herror T_get_region_polygon(const Hobject 区域, const Htuple Tolerance, Htuple* Rows, Htuple* Columns)

void GetRegionPolygon(const HObject& 区域, const HTuple& Tolerance, HTuple* Rows, HTuple* Columns)

void HRegion::GetRegionPolygon(const HTuple& Tolerance, HTuple* Rows, HTuple* Columns) const

void HRegion::GetRegionPolygon(double Tolerance, HTuple* Rows, HTuple* Columns) const

static void HOperatorSet.GetRegionPolygon(HObject 区域, HTuple tolerance, out HTuple rows, out HTuple columns)

void HRegion.GetRegionPolygon(HTuple tolerance, out HTuple rows, out HTuple columns)

void HRegion.GetRegionPolygon(double tolerance, out HTuple rows, out HTuple columns)

def get_region_polygon(区域: HObject, tolerance: Union[int, float]) -> Tuple[Sequence[int], Sequence[int]]

描述

The operator get_region_polygonget_region_polygonGetRegionPolygonGetRegionPolygonGetRegionPolygonget_region_polygon calculates a polygon to approximate the edge of a region. A polygon is a sequence of line (RowsRowsRowsRowsrowsrows) and column coordinates (ColumnsColumnsColumnsColumnscolumnscolumns). It describes the contour of the region. Only the base points of the polygon are returned. The parameter ToleranceToleranceToleranceTolerancetolerancetolerance indicates how large the maximum distance between the polygon and the edge of the region may be. Holes of the region are ignored. The operator get_region_polygonget_region_polygonGetRegionPolygonGetRegionPolygonGetRegionPolygonget_region_polygon returns the coordinates in the form of tuples.

注意

Holes of the region are ignored. Only one region may be passed, and this region must have exactly one connection component.

运行信息

参数表

区域区域区域区域区域区域 (input_object)  region objectHRegionHObjectHRegionHobject

Region to be approximated.

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

Maximum distance between the polygon and the edge of the region.

Default: 5.0

Suggested values: 0.0, 2.0, 5.0, 10.0

Value range: 0.0 ≤ Tolerance Tolerance Tolerance Tolerance tolerance tolerance (lin)

Minimum increment: 0.01

Recommended increment: 1.0

RowsRowsRowsRowsrowsrows (output_control)  polygon.y-array HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Line numbers of the base points of the contour.

ColumnsColumnsColumnsColumnscolumnscolumns (output_control)  polygon.x-array HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Column numbers of the base points of the contour.

Number of elements: Columns == Rows

结果

The operator get_region_polygonget_region_polygonGetRegionPolygonGetRegionPolygonGetRegionPolygonget_region_polygon normally returns the value 2 ( H_MSG_TRUE) . If more than one connection component is passed an exception is raised. The behavior in case of empty input (no input regions available) is set via the operator set_system('no_object_result',<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>).

可能的前置算子

sobel_ampsobel_ampSobelAmpSobelAmpSobelAmpsobel_amp, thresholdthresholdThresholdThresholdThresholdthreshold, skeletonskeletonSkeletonSkeletonSkeletonskeleton, edges_imageedges_imageEdgesImageEdgesImageEdgesImageedges_image

参考其它

copy_objcopy_objCopyObjCopyObjCopyObjcopy_obj, gen_region_polygongen_region_polygonGenRegionPolygonGenRegionPolygonGenRegionPolygongen_region_polygon, disp_polygondisp_polygonDispPolygonDispPolygonDispPolygondisp_polygon, get_region_contourget_region_contourGetRegionContourGetRegionContourGetRegionContourget_region_contour, set_line_approxset_line_approxSetLineApproxSetLineApproxSetLineApproxset_line_approx

模块

Foundation