orientation_regionorientation_regionOrientationRegionOrientationRegionorientation_region (算子名称)

名称

orientation_regionorientation_regionOrientationRegionOrientationRegionorientation_region — Orientation of a region.

参数签名

orientation_region(区域 : : : Phi)

Herror orientation_region(const Hobject 区域, double* Phi)

Herror T_orientation_region(const Hobject 区域, Htuple* Phi)

void OrientationRegion(const HObject& 区域, HTuple* Phi)

HTuple HRegion::OrientationRegion() const

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

HTuple HRegion.OrientationRegion()

def orientation_region(区域: HObject) -> Sequence[float]

def orientation_region_s(区域: HObject) -> float

描述

该算子 orientation_regionorientation_regionOrientationRegionOrientationRegionOrientationRegionorientation_region calculates the orientation of the region. 该算子 is based on elliptic_axiselliptic_axisEllipticAxisEllipticAxisEllipticAxiselliptic_axis. In addition the point on the contour with maximal distance to the center of gravity is calculated. If, in the rotated coordinate system, the column coordinate of this point is less than the column coordinate of the center of gravity, the value of is added to the angle.

In the documentation of this chapter (Regions / Features), you can find an image illustrating regions which vary in their orientation.

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>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>)).

运行信息

参数表

区域区域区域区域区域区域 (input_object)  region(-array) objectHRegionHObjectHRegionHobject

Region(s) to be examined.

PhiPhiPhiPhiphiphi (output_control)  angle.rad(-array) HTupleSequence[float]HTupleHtuple (real) (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)).

结果

该算子 orientation_regionorientation_regionOrientationRegionOrientationRegionOrientationRegionorientation_region 返回值 2 ( H_MSG_TRUE) if the input is not empty. The behavior in case of empty input (no input regions available) is set via 该算子 set_system('no_object_result',<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)set_system("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>)SetSystem("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>)set_system("empty_region_result",<Result>). If necessary an exception is raised.

可能的前置算子

thresholdthresholdThresholdThresholdThresholdthreshold, regiongrowingregiongrowingRegiongrowingRegiongrowingRegiongrowingregiongrowing, connectionconnectionConnectionConnectionConnectionconnection

可能的后置算子

disp_arrowdisp_arrowDispArrowDispArrowDispArrowdisp_arrow

可替代算子

elliptic_axiselliptic_axisEllipticAxisEllipticAxisEllipticAxiselliptic_axis, smallest_rectangle2smallest_rectangle2SmallestRectangle2SmallestRectangle2SmallestRectangle2smallest_rectangle2

参考其它

moments_region_2ndmoments_region_2ndMomentsRegion2ndMomentsRegion2ndMomentsRegion2ndmoments_region_2nd, line_orientationline_orientationLineOrientationLineOrientationLineOrientationline_orientation

模块

Foundation