get_region_contourT_get_region_contourGetRegionContourGetRegionContourget_region_contour(算子)

名称

get_region_contourT_get_region_contourGetRegionContourGetRegionContourget_region_contour — 访问对象的轮廓。

签名

get_region_contour(Region : : : Rows, Columns)

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

void GetRegionContour(const HObject& Region, HTuple* Rows, HTuple* Columns)

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

static void HOperatorSet.GetRegionContour(HObject region, out HTuple rows, out HTuple columns)

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

def get_region_contour(region: HObject) -> Tuple[Sequence[int], Sequence[int]]

描述

算子 get_region_contourget_region_contourGetRegionContourGetRegionContourGetRegionContourget_region_contour returns the contour of a region. A contour is a result of line (RowsRowsRowsRowsrowsrows) and column coordinates (ColumnsColumnsColumnsColumnscolumnscolumns), describing the boundary of the region. The contour lies on the region. It starts at the smallest line number. In that line at the pixel with the largest column index. The rotation direction is clockwise. The first pixel of the contour is identical with the last. Holes of the region are ignored. The operator get_region_contourget_region_contourGetRegionContourGetRegionContourGetRegionContourget_region_contour returns the coordinates in the form of tuples. An empty region is passed as empty tuple.

注意

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

执行信息

参数

RegionRegionRegionRegionregionregion (输入对象)  region objectHRegionHObjectHRegionHobject

Output region.

RowsRowsRowsRowsrowsrows (输出控制)  contour.y-array HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Line numbers of the contour pixels.

ColumnsColumnsColumnsColumnscolumnscolumns (输出控制)  contour.x-array HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Column numbers of the contour pixels.

元素数量: Columns == Rows

结果

算子 get_region_contourget_region_contourGetRegionContourGetRegionContourGetRegionContourget_region_contour normally returns the value 2 ( H_MSG_TRUE )。 If more than one connection component is passed an exception is raised. 当输入为空(无可用输入区域)时,可设置行为通过算子 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, gen_rectangle1gen_rectangle1GenRectangle1GenRectangle1GenRectangle1gen_rectangle1, gen_circlegen_circleGenCircleGenCircleGenCirclegen_circle

另见

copy_objcopy_objCopyObjCopyObjCopyObjcopy_obj, get_region_polygonget_region_polygonGetRegionPolygonGetRegionPolygonGetRegionPolygonget_region_polygon

模块

基础