get_region_convexT_get_region_convexGetRegionConvexGetRegionConvexget_region_convex (Operator)
Name
get_region_convexT_get_region_convexGetRegionConvexGetRegionConvexget_region_convex
— Access convex hull as contour.
Signature
def get_region_convex(region: HObject) -> Tuple[Sequence[int], Sequence[int]]
Description
The operator get_region_convexget_region_convexGetRegionConvexGetRegionConvexGetRegionConvexget_region_convex
returns the convex hull of a region
as polygon. The polygon is the minimum result
of line (RowsRowsRowsRowsrowsrows
) and column coordinates (ColumnsColumnsColumnsColumnscolumnscolumns
)
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_convexget_region_convexGetRegionConvexGetRegionConvexGetRegionConvexget_region_convex
returns the coordinates in the form
of tuples. An empty region is passed as empty tuple.
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
RegionRegionRegionRegionregionregion
(input_object) region →
objectHRegionHObjectHRegionHobject
Output region.
RowsRowsRowsRowsrowsrows
(output_control) contour.y-array →
HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Line numbers of contour pixels.
ColumnsColumnsColumnsColumnscolumnscolumns
(output_control) contour.x-array →
HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Column numbers of the contour pixels.
Number of elements: Columns == Rows
Result
The operator get_region_convexget_region_convexGetRegionConvexGetRegionConvexGetRegionConvexget_region_convex
returns the value 2 (H_MSG_TRUE).
Possible Predecessors
thresholdthresholdThresholdThresholdThresholdthreshold
,
skeletonskeletonSkeletonSkeletonSkeletonskeleton
,
dyn_thresholddyn_thresholdDynThresholdDynThresholdDynThresholddyn_threshold
Possible Successors
disp_polygondisp_polygonDispPolygonDispPolygonDispPolygondisp_polygon
Alternatives
shape_transshape_transShapeTransShapeTransShapeTransshape_trans
See also
select_objselect_objSelectObjSelectObjSelectObjselect_obj
,
get_region_contourget_region_contourGetRegionContourGetRegionContourGetRegionContourget_region_contour
Module
Foundation