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

orientation_regionorientation_regionorientation_regionOrientationRegionOrientationRegion (Operator)

Name

orientation_regionorientation_regionorientation_regionOrientationRegionOrientationRegion — Orientation of a region.

Signature

orientation_region(Regions : : : Phi)

Herror orientation_region(const Hobject Regions, double* Phi)

Herror T_orientation_region(const Hobject Regions, Htuple* Phi)

Herror orientation_region(Hobject Regions, double* Phi)

Herror orientation_region(Hobject Regions, HTuple* Phi)

double HRegion::OrientationRegion() const

HTuple HRegionArray::OrientationRegion() const

void HOperatorSetX.OrientationRegion(
[in] IHUntypedObjectX* Regions, [out] VARIANT* Phi)

VARIANT HRegionX.OrientationRegion()

static void HOperatorSet.OrientationRegion(HObject regions, out HTuple phi)

HTuple HRegion.OrientationRegion()

Description

The operator orientation_regionorientation_regionorientation_regionOrientationRegionOrientationRegion calculates the orientation of the region. The operator is based on elliptic_axiselliptic_axiselliptic_axisEllipticAxisEllipticAxis. In addition the point on the contour with maximal distance to the center of gravity is calculated. If the column coordinate of this point is less than the column coordinate of the center of gravity the value of Pi is added to the angle.

If more than one region is passed the results are stored in tuples, the index of a value in the tuple corresponding to the index of a region in the input.

In case of empty region all parameters have the value 0.0 if no other behavior was set (see 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>)).

Parallelization

Parameters

RegionsRegionsRegionsRegionsregions (input_object)  region(-array) objectHRegionHRegionHRegionXHobject

Region(s) to be examined.

PhiPhiPhiPhiphi (output_control)  real(-array) HTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double)

Orientation of region (arc measure).

Assertion: (- pi <= Phi) && (Phi < pi)

Complexity

If F is the area of a region the mean runtime complexity is O(sqrt(F)).

Result

The operator orientation_regionorientation_regionorientation_regionOrientationRegionOrientationRegion returns the value 2 (H_MSG_TRUE) if the input is not empty. 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>). The behavior in case of empty region (the region is the empty set) is set via set_system('empty_region_result',<Result>)set_system("empty_region_result",<Result>)set_system("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>). If necessary an exception is raised.

Possible Predecessors

thresholdthresholdthresholdThresholdThreshold, regiongrowingregiongrowingregiongrowingRegiongrowingRegiongrowing, connectionconnectionconnectionConnectionConnection

Possible Successors

disp_arrowdisp_arrowdisp_arrowDispArrowDispArrow

Alternatives

elliptic_axiselliptic_axiselliptic_axisEllipticAxisEllipticAxis, smallest_rectangle2smallest_rectangle2smallest_rectangle2SmallestRectangle2SmallestRectangle2

See also

moments_region_2ndmoments_region_2ndmoments_region_2ndMomentsRegion2ndMomentsRegion2nd, line_orientationline_orientationline_orientationLineOrientationLineOrientation

Module

Foundation


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