orientation_region orientation_region OrientationRegion OrientationRegion orientation_region (算子)
名称
orientation_region orientation_region OrientationRegion OrientationRegion orientation_region — 一个区域的方向。
签名
Herror orientation_region (const Hobject Regions , double* Phi )
Herror T_orientation_region (const Hobject Regions , Htuple* Phi )
def orientation_region (regions : HObject) -> Sequence[float]
def orientation_region_s (regions : HObject) -> float
描述
算子 orientation_region orientation_region OrientationRegion OrientationRegion OrientationRegion orientation_region calculates the
orientation of the region. The operator is based on elliptic_axis elliptic_axis EllipticAxis EllipticAxis EllipticAxis elliptic_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>) ).
执行信息
多线程类型:可重入(与非独占算子并行运行)。
多线程作用域:全局(可从任何线程调用)。
在元组级别上自动并行化。
参数
Regions Regions Regions Regions regions regions (输入对象) region(-array) → object HRegion HObject HRegion Hobject
待检查的区域。
Phi Phi Phi Phi phi phi (输出控制) angle.rad(-array) → HTuple Sequence[float] HTuple Htuple (real) (double ) (double ) (double )
Orientation of region (arc measure).
Assertion:
- pi <= Phi && Phi < pi
复杂度
If F is the area of a region the mean runtime
complexity is O(sqrt(F)).
结果
算子 orientation_region orientation_region OrientationRegion OrientationRegion OrientationRegion orientation_region 在输入不为空时返回值 2 ( H_MSG_TRUE )。当输入为空(无可用输入区域)时,可设置行为通过算子 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>) 。空区域(区域是空集)的情况下的可设置行为通过
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>) 。如有必要,则抛出异常。
可能的前趋
threshold threshold Threshold Threshold Threshold threshold ,
regiongrowing regiongrowing Regiongrowing Regiongrowing Regiongrowing regiongrowing ,
connection connection Connection Connection Connection connection
可能的后继
disp_arrow disp_arrow DispArrow DispArrow DispArrow disp_arrow
替代
elliptic_axis elliptic_axis EllipticAxis EllipticAxis EllipticAxis elliptic_axis ,
smallest_rectangle2 smallest_rectangle2 SmallestRectangle2 SmallestRectangle2 SmallestRectangle2 smallest_rectangle2
另见
moments_region_2nd moments_region_2nd MomentsRegion2nd MomentsRegion2nd MomentsRegion2nd moments_region_2nd ,
line_orientation line_orientation LineOrientation LineOrientation LineOrientation line_orientation
模块
基础