Skip to content

get_region_convexGetRegionConvexGetRegionConvexget_region_convexT_get_region_convex🔗

Short description🔗

get_region_convexGetRegionConvexGetRegionConvexget_region_convexT_get_region_convex — Access convex hull as contour.

Signature🔗

get_region_convex( region Region, out contour.y Rows, out contour.x Columns )void GetRegionConvex( const HObject& Region, HTuple* Rows, HTuple* Columns )static void HOperatorSet.GetRegionConvex( HObject region, out HTuple rows, out HTuple columns )def get_region_convex( region: HObject ) -> Tuple[Sequence[int], Sequence[int]]

Herror T_get_region_convex( const Hobject Region, Htuple* Rows, Htuple* Columns )

void HRegion::GetRegionConvex( HTuple* Rows, HTuple* Columns ) const

void HRegion.GetRegionConvex( out HTuple rows, out HTuple columns )

Description🔗

The operator get_region_convexGetRegionConvex returns the convex hull of a region as polygon. The polygon is the minimum result of line (Rowsrowsrows) and column coordinates (Columnscolumnscolumns) describing the hull of the region. The polygon pixels lie on the region. The polygon starts at the smallest line number; in this line at the pixel with the largest column index. The rotation direction is clockwise. The first pixel of the polygon is identical with the last. The operator get_region_convexGetRegionConvex returns the coordinates in the form of tuples. An empty region is passed as empty tuple.

Execution information🔗

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

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

  • Processed without parallelization.

Parameters🔗

Regionregionregion (input_object) region → objectHObjectHRegionHObjectHobject

Output region.

Rowsrowsrows (output_control) contour.y-array → (integer)HTuple (Hlong)HTuple (int / long)Sequence[int]Htuple (Hlong)

Line numbers of contour pixels.

Columnscolumnscolumns (output_control) contour.x-array → (integer)HTuple (Hlong)HTuple (int / long)Sequence[int]Htuple (Hlong)

Column numbers of the contour pixels.

Number of elements: Columns == Rows

Result🔗

The operator get_region_convexGetRegionConvex returns the value 2 (H_MSG_TRUE).

Combinations with other operators🔗

Combinations

Possible predecessors

thresholdThreshold, skeletonSkeleton, dyn_thresholdDynThreshold

Possible successors

disp_polygonDispPolygon

Alternatives

shape_transShapeTrans

See also

select_objSelectObj, get_region_contourGetRegionContour

Module🔗

Foundation