get_region_chainT_get_region_chainGetRegionChainGetRegionChainget_region_chain (算子名称)

名称

get_region_chainT_get_region_chainGetRegionChainGetRegionChainget_region_chain — Contour of an object as chain code.

Warning

get_region_chainget_region_chainGetRegionChainGetRegionChainGetRegionChainget_region_chain is obsolete and is only provided for reasons of backward compatibility.

参数签名

get_region_chain(区域 : : : Row, Column, Chain)

Herror T_get_region_chain(const Hobject 区域, Htuple* Row, Htuple* Column, Htuple* Chain)

void GetRegionChain(const HObject& 区域, HTuple* Row, HTuple* Column, HTuple* Chain)

void HRegion::GetRegionChain(Hlong* Row, Hlong* Column, HTuple* Chain) const

static void HOperatorSet.GetRegionChain(HObject 区域, out HTuple row, out HTuple column, out HTuple chain)

void HRegion.GetRegionChain(out int row, out int column, out HTuple chain)

def get_region_chain(区域: HObject) -> Tuple[int, int, Sequence[int]]

描述

The operator get_region_chainget_region_chainGetRegionChainGetRegionChainGetRegionChainget_region_chain returns the contour of a region. A contour is a series of pixels describing the outline 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 occurs clockwise. Holes of the region are ignored. The direction code (chain code) is defined as follows:

3 2 1 4 * 0 5 6 7 The operator get_region_chainget_region_chainGetRegionChainGetRegionChainGetRegionChainget_region_chain returns the code in the form of a tuple. In case of an empty region the parameters RowRowRowRowrowrow and ColumnColumnColumnColumncolumncolumn are zero and ChainChainChainChainchainchain is the empty tuple.

注意

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

运行信息

参数表

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

Region to be transformed.

RowRowRowRowrowrow (output_control)  chain.begin.y HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Line of starting point.

ColumnColumnColumnColumncolumncolumn (output_control)  chain.begin.x HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Column of starting point.

ChainChainChainChainchainchain (output_control)  chain.code-array HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Direction code of the contour (from starting point).

Value range: 0 ≤ Chain Chain Chain Chain chain chain ≤ 7

结果

The operator get_region_chainget_region_chainGetRegionChainGetRegionChainGetRegionChainget_region_chain 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>). The behavior in case of empty region (the region is the empty set) is set via the operator set_system('empty_region_result',<Result>)set_system("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>)set_system("empty_region_result",<Result>). If necessary an exception is raised.

可能的前置算子

sobel_ampsobel_ampSobelAmpSobelAmpSobelAmpsobel_amp, thresholdthresholdThresholdThresholdThresholdthreshold, skeletonskeletonSkeletonSkeletonSkeletonskeleton, edges_imageedges_imageEdgesImageEdgesImageEdgesImageedges_image, gen_rectangle1gen_rectangle1GenRectangle1GenRectangle1GenRectangle1gen_rectangle1, gen_circlegen_circleGenCircleGenCircleGenCirclegen_circle

可能的后置算子

approx_chainapprox_chainApproxChainApproxChainApproxChainapprox_chain, approx_chain_simpleapprox_chain_simpleApproxChainSimpleApproxChainSimpleApproxChainSimpleapprox_chain_simple

参考其它

copy_objcopy_objCopyObjCopyObjCopyObjcopy_obj, get_region_contourget_region_contourGetRegionContourGetRegionContourGetRegionContourget_region_contour, get_region_polygonget_region_polygonGetRegionPolygonGetRegionPolygonGetRegionPolygonget_region_polygon

模块

Foundation