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

get_region_indexget_region_indexget_region_indexGetRegionIndexGetRegionIndex (Operator)

Name

get_region_indexget_region_indexget_region_indexGetRegionIndexGetRegionIndex — Index of all regions containing a given pixel.

Signature

get_region_index(Regions : : Row, Column : Index)

Herror get_region_index(const Hobject Regions, const Hlong Row, const Hlong Column, Hlong* Index)

Herror T_get_region_index(const Hobject Regions, const Htuple Row, const Htuple Column, Htuple* Index)

Herror get_region_index(Hobject Regions, const HTuple& Row, const HTuple& Column, Hlong* Index)

Herror get_region_index(Hobject Regions, const HTuple& Row, const HTuple& Column, HTuple* Index)

HTuple HRegionArray::GetRegionIndex(const HTuple& Row, const HTuple& Column) const

void HOperatorSetX.GetRegionIndex(
[in] IHUntypedObjectX* Regions, [in] VARIANT Row, [in] VARIANT Column, [out] VARIANT* Index)

VARIANT HRegionX.GetRegionIndex(
[in] Hlong Row, [in] Hlong Column)

static void HOperatorSet.GetRegionIndex(HObject regions, HTuple row, HTuple column, out HTuple index)

HTuple HRegion.GetRegionIndex(int row, int column)

Description

The operator get_region_indexget_region_indexget_region_indexGetRegionIndexGetRegionIndex returns the index of all regions in RegionsRegionsRegionsRegionsregions (range of values: 1 to n) containing the test pixel (RowRowRowRowrow,ColumnColumnColumnColumncolumn), i.e.:

   |Region[n] intersection {(Row,Column)}| = {(Row,Column)}

The returned indices can be used, e.g., in select_objselect_objselect_objSelectObjSelectObj to select the regions containing the test pixel.

Attention

If the regions overlap more than one region might contain the pixel. In this case all these regions are returned. If no region contains the indicated pixel the empty tuple (= no region) is returned.

Parallelization

Parameters

RegionsRegionsRegionsRegionsregions (input_object)  region-array objectHRegionHRegionArrayHRegionXHobject

Regions to be examined.

RowRowRowRowrow (input_control)  point.y HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

Line index of the test pixel.

Default value: 100

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

ColumnColumnColumnColumncolumn (input_control)  point.x HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

Column index of the test pixel.

Default value: 100

Typical range of values: Column Column Column Column column (lin)

IndexIndexIndexIndexindex (output_control)  integer(-array) HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

Index of the regions containing the test pixel.

Complexity

If F is the area of the region and N is the number of regions the mean runtime complexity is O(ln(sqrt(F)) * N).

Result

The operator get_region_indexget_region_indexget_region_indexGetRegionIndexGetRegionIndex returns the value 2 (H_MSG_TRUE) if the parameters are correct. 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>). If necessary an exception is raised.

Possible Predecessors

thresholdthresholdthresholdThresholdThreshold, regiongrowingregiongrowingregiongrowingRegiongrowingRegiongrowing, connectionconnectionconnectionConnectionConnection

Alternatives

select_region_pointselect_region_pointselect_region_pointSelectRegionPointSelectRegionPoint

See also

get_mbuttonget_mbuttonget_mbuttonGetMbuttonGetMbutton, get_mpositionget_mpositionget_mpositionGetMpositionGetMposition, test_region_pointtest_region_pointtest_region_pointTestRegionPointTestRegionPoint

Module

Foundation


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