HALCON Reference Manual 10.0.2
Table of Contents / Regions / Access ClassesClassesClasses | | | Operators

get_region_polygonT_get_region_polygonget_region_polygonGetRegionPolygonGetRegionPolygon (Operator)

Name

get_region_polygonT_get_region_polygonget_region_polygonGetRegionPolygonGetRegionPolygon — Polygon approximation of a region.

Signature

get_region_polygon(Region : : Tolerance : Rows, Columns)

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

Herror get_region_polygon(Hobject Region, const HTuple& Tolerance, HTuple* Rows, HTuple* Columns)

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

void HOperatorSetX.GetRegionPolygon(
[in] IHUntypedObjectX* Region, [in] VARIANT Tolerance, [out] VARIANT* Rows, [out] VARIANT* Columns)

VARIANT HRegionX.GetRegionPolygon(
[in] VARIANT Tolerance, [out] VARIANT* Columns)

static void HOperatorSet.GetRegionPolygon(HObject region, 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)

Description

The operator get_region_polygonget_region_polygonget_region_polygonGetRegionPolygonGetRegionPolygon calculates a polygon to approximate the edge of a region. A polygon is a sequence of line (RowsRowsRowsRowsrows) and column coordinates (ColumnsColumnsColumnsColumnscolumns). It describes the contour of the region. Only the base points of the polygon are returned. The parameter ToleranceToleranceToleranceTolerancetolerance 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_polygonget_region_polygonGetRegionPolygonGetRegionPolygon returns the coordinates in the form of tuples.

Attention

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

Parallelization

Parameters

RegionRegionRegionRegionregion (input_object)  region objectHRegionHRegionHRegionXHobject

Region to be approximated.

ToleranceToleranceToleranceTolerancetolerance (input_control)  number HTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong)

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

Default value: 5.0

Suggested values: 0.0, 2.0, 5.0, 10.0

Typical range of values: 0.0 ≤ Tolerance Tolerance Tolerance Tolerance tolerance (lin)

Minimum increment: 0.01

Recommended increment: 1.0

RowsRowsRowsRowsrows (output_control)  polygon.y-array HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

Line numbers of the base points of the contour.

ColumnsColumnsColumnsColumnscolumns (output_control)  polygon.x-array HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

Column numbers of the base points of the contour.

Number of elements: Columns == Rows

Result

The operator get_region_polygonget_region_polygonget_region_polygonGetRegionPolygonGetRegionPolygon 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>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>).

Possible Predecessors

sobel_ampsobel_ampsobel_ampSobelAmpSobelAmp, thresholdthresholdthresholdThresholdThreshold, skeletonskeletonskeletonSkeletonSkeleton, edges_imageedges_imageedges_imageEdgesImageEdgesImage

See also

copy_objcopy_objcopy_objCopyObjCopyObj, gen_region_polygongen_region_polygongen_region_polygonGenRegionPolygonGenRegionPolygon, disp_polygondisp_polygondisp_polygonDispPolygonDispPolygon, get_region_chainget_region_chainget_region_chainGetRegionChainGetRegionChain, get_region_contourget_region_contourget_region_contourGetRegionContourGetRegionContour, set_line_approxset_line_approxset_line_approxSetLineApproxSetLineApprox

Module

Foundation


Table of Contents / Regions / Access ClassesClassesClasses | | | Operators
HALCON Reference Manual 10.0.2 Copyright © 1996-2011 MVTec Software GmbH