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

get_region_runsT_get_region_runsget_region_runsGetRegionRunsGetRegionRuns (Operator)

Name

get_region_runsT_get_region_runsget_region_runsGetRegionRunsGetRegionRuns — Access the runlength coding of a region.

Signature

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

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

Herror get_region_runs(Hobject Region, HTuple* Row, HTuple* ColumnBegin, HTuple* ColumnEnd)

HTuple HRegion::GetRegionRuns(HTuple* ColumnBegin, HTuple* ColumnEnd) const

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

VARIANT HRegionX.GetRegionRuns(
[out] VARIANT* ColumnBegin, [out] VARIANT* ColumnEnd)

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

void HRegion.GetRegionRuns(out HTuple row, out HTuple columnBegin, out HTuple columnEnd)

Description

The operator get_region_runsget_region_runsget_region_runsGetRegionRunsGetRegionRuns returns the region data in the form of chord tuples. The chord representation is caused by examining a region line by line with ascending line number (= from “top” to “bottom”). Every line is passed from left to right (ascending column number); storing all starting and ending points of region segments (= chords). Thus a region can be described by a sequence of chords, a chord being defined by line number, starting and ending points (column number). The operator get_region_runsget_region_runsget_region_runsGetRegionRunsGetRegionRuns returns the three components of the chords in the form of tuples. In case of an empty region three empty tuples are returned.

Attention

Only one region may be passed.

Parallelization

Parameters

RegionRegionRegionRegionregion (input_object)  region objectHRegionHRegionHRegionXHobject

Output region.

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

Line numbers of the chords.

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

Column numbers of the starting points of the chords.

Number of elements: ColumnBegin == Row

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

Column numbers of the ending points of the chords.

Number of elements: ColumnEnd == Row

Result

The operator get_region_runsget_region_runsget_region_runsGetRegionRunsGetRegionRuns normally returns the value 2 (H_MSG_TRUE). If more than one region 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>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>).

Possible Predecessors

thresholdthresholdthresholdThresholdThreshold, connectionconnectionconnectionConnectionConnection

Alternatives

get_region_pointsget_region_pointsget_region_pointsGetRegionPointsGetRegionPoints

See also

copy_objcopy_objcopy_objCopyObjCopyObj, gen_region_runsgen_region_runsgen_region_runsGenRegionRunsGenRegionRuns

Module

Foundation


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