gen_region_runsgen_region_runsGenRegionRunsGenRegionRunsgen_region_runs (算子名称)

名称

gen_region_runsgen_region_runsGenRegionRunsGenRegionRunsgen_region_runs — Create a region from a runlength coding.

参数签名

gen_region_runs( : 区域 : Row, ColumnBegin, ColumnEnd : )

Herror gen_region_runs(Hobject* 区域, const Hlong Row, const Hlong ColumnBegin, const Hlong ColumnEnd)

Herror T_gen_region_runs(Hobject* 区域, const Htuple Row, const Htuple ColumnBegin, const Htuple ColumnEnd)

void GenRegionRuns(HObject* 区域, const HTuple& Row, const HTuple& ColumnBegin, const HTuple& ColumnEnd)

void HRegion::GenRegionRuns(const HTuple& Row, const HTuple& ColumnBegin, const HTuple& ColumnEnd)

void HRegion::GenRegionRuns(Hlong Row, Hlong ColumnBegin, Hlong ColumnEnd)

static void HOperatorSet.GenRegionRuns(out HObject 区域, HTuple row, HTuple columnBegin, HTuple columnEnd)

void HRegion.GenRegionRuns(HTuple row, HTuple columnBegin, HTuple columnEnd)

void HRegion.GenRegionRuns(int row, int columnBegin, int columnEnd)

def gen_region_runs(row: MaybeSequence[int], column_begin: MaybeSequence[int], column_end: MaybeSequence[int]) -> HObject

描述

该算子 gen_region_runsgen_region_runsGenRegionRunsGenRegionRunsGenRegionRunsgen_region_runs creates a region described by the input runlength structure. The runlength representation is created by examining a region line by line with ascending line number (= from “top” to “bottom”). Every line runs through from left to right (ascending column number). All starting and ending points being stored by region segments (=runs). Thus a region can be described by a sequence of runs, a run being defined by line number as well as starting and ending points (column number).

The storing is fastest when the runs are sorted. The order is as follows:

.

注意

For runtime reasons, it is not checked whether the restriction ColumnEndColumnEndColumnEndColumnEndcolumnEndcolumn_end >= ColumnBeginColumnBeginColumnBeginColumnBegincolumnBegincolumn_begin is fulfilled. Note that if this restriction is violated, subsequent operations will likely lead to errors or unexpected behavior.

运行信息

参数表

区域区域区域区域区域区域 (output_object)  region objectHRegionHObjectHRegionHobject *

Created region.

RowRowRowRowrowrow (input_control)  chord.y(-array) HTupleMaybeSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Lines of the runs.

Default: 100

Suggested values: 0, 50, 100, 200, 300, 500

Value range: Row Row Row Row row row (lin)

Minimum increment: 1

Recommended increment: 10

ColumnBeginColumnBeginColumnBeginColumnBegincolumnBegincolumn_begin (input_control)  chord.x1(-array) HTupleMaybeSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Columns of the starting points of the runs.

Number of elements: ColumnBegin == Row

Default: 50

Suggested values: 0, 50, 100, 200, 300, 500

Value range: ColumnBegin ColumnBegin ColumnBegin ColumnBegin columnBegin column_begin (lin)

Minimum increment: 1

Recommended increment: 10

ColumnEndColumnEndColumnEndColumnEndcolumnEndcolumn_end (input_control)  chord.x2(-array) HTupleMaybeSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Columns of the ending points of the runs.

Number of elements: ColumnEnd == Row

Default: 200

Suggested values: 50, 100, 200, 300, 500

Value range: ColumnEnd ColumnEnd ColumnEnd ColumnEnd columnEnd column_end (lin)

Minimum increment: 1

Recommended increment: 10

Restriction: ColumnEnd >= ColumnBegin

Complexity

F shall be the number of pixels. If the pixels are sorted in ascending order the runtime complexity is: O(F), otherwise it is O(log(F)*F).

结果

If the data is correct 该算子 gen_region_runsgen_region_runsGenRegionRunsGenRegionRunsGenRegionRunsgen_region_runs 返回值 2 ( H_MSG_TRUE) , otherwise an exception is raised. The clipping according to the current image format is set via the operator set_system('clip_region',<'true'/'false'>)set_system("clip_region",<"true"/"false">)SetSystem("clip_region",<"true"/"false">)SetSystem("clip_region",<"true"/"false">)SetSystem("clip_region",<"true"/"false">)set_system("clip_region",<"true"/"false">). If an empty region is created (by the clipping or by an empty input) 该算子 set_system('store_empty_region',<'true'/'false'>)set_system("store_empty_region",<"true"/"false">)SetSystem("store_empty_region",<"true"/"false">)SetSystem("store_empty_region",<"true"/"false">)SetSystem("store_empty_region",<"true"/"false">)set_system("store_empty_region",<"true"/"false">) determines whether the region is returned or an empty object tuple.

可能的前置算子

get_region_runsget_region_runsGetRegionRunsGetRegionRunsGetRegionRunsget_region_runs

可替代算子

gen_region_pointsgen_region_pointsGenRegionPointsGenRegionPointsGenRegionPointsgen_region_points, gen_region_polygongen_region_polygonGenRegionPolygonGenRegionPolygonGenRegionPolygongen_region_polygon, gen_region_linegen_region_lineGenRegionLineGenRegionLineGenRegionLinegen_region_line, gen_region_polygon_filledgen_region_polygon_filledGenRegionPolygonFilledGenRegionPolygonFilledGenRegionPolygonFilledgen_region_polygon_filled

参考其它

reduce_domainreduce_domainReduceDomainReduceDomainReduceDomainreduce_domain

模块

Foundation