HALCON Reference Manual 10.0.2
Table of Contents / Regions / Creation ClassesClassesClasses | | | Operators

gen_region_runsgen_region_runsgen_region_runsGenRegionRunsGenRegionRuns (Operator)

Name

gen_region_runsgen_region_runsgen_region_runsGenRegionRunsGenRegionRuns — Create an image region from a runlength coding.

Signature

gen_region_runs( : Region : Row, ColumnBegin, ColumnEnd : )

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

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

Herror gen_region_runs(Hobject* Region, const HTuple& Row, const HTuple& ColumnBegin, const HTuple& ColumnEnd)

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

void HOperatorSetX.GenRegionRuns(
[out] IHUntypedObjectX*Region, [in] VARIANT Row, [in] VARIANT ColumnBegin, [in] VARIANT ColumnEnd)

void HRegionX.GenRegionRuns(
[in] VARIANT Row, [in] VARIANT ColumnBegin, [in] VARIANT ColumnEnd)

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

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

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

Description

The operator gen_region_runsgen_region_runsgen_region_runsGenRegionRunsGenRegionRuns 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:

       (l1,b1,e1) <= (l2,b2,e2) := l1 < l2 or l1 = l2 and b1 <= b2

.

Parallelization

Parameters

RegionRegionRegionRegionregion (output_object)  region objectHRegionHRegionHRegionXHobject *

Created region.

RowRowRowRowrow (input_control)  chord.y(-array) HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

Lines of the runs.

Default value: 100

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

Typical range of values: Row Row Row Row row (lin)

Minimum increment: 1

Recommended increment: 10

ColumnBeginColumnBeginColumnBeginColumnBegincolumnBegin (input_control)  chord.x1(-array) HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

Columns of the starting points of the runs.

Number of elements: ColumnBegin == Row

Default value: 50

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

Typical range of values: ColumnBegin ColumnBegin ColumnBegin ColumnBegin columnBegin (lin)

Minimum increment: 1

Recommended increment: 10

ColumnEndColumnEndColumnEndColumnEndcolumnEnd (input_control)  chord.x2(-array) HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

Columns of the ending points of the runs.

Number of elements: ColumnEnd == Row

Default value: 200

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

Typical range of values: ColumnEnd ColumnEnd ColumnEnd ColumnEnd columnEnd (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).

Result

If the data is correct the operator gen_region_runsgen_region_runsgen_region_runsGenRegionRunsGenRegionRuns returns the value 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">)set_system("clip_region",<"true"/"false">)SetSystem("clip_region",<"true"/"false">)SetSystem("clip_region",<"true"/"false">). If an empty region is created (by the clipping or by an empty input) the operator set_system('store_empty_region',<true/false>)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>) determines whether the region is returned or an empty object tuple.

Possible Predecessors

get_region_runsget_region_runsget_region_runsGetRegionRunsGetRegionRuns

Alternatives

gen_region_pointsgen_region_pointsgen_region_pointsGenRegionPointsGenRegionPoints, gen_region_polygongen_region_polygongen_region_polygonGenRegionPolygonGenRegionPolygon, gen_region_linegen_region_linegen_region_lineGenRegionLineGenRegionLine, gen_region_polygon_filledgen_region_polygon_filledgen_region_polygon_filledGenRegionPolygonFilledGenRegionPolygonFilled

See also

reduce_domainreduce_domainreduce_domainReduceDomainReduceDomain

Module

Foundation


Table of Contents / Regions / Creation ClassesClassesClasses | | | Operators
HALCON Reference Manual 10.0.2 Copyright © 1996-2011 MVTec Software GmbH