elliptic_axis_points_xld elliptic_axis_points_xld EllipticAxisPointsXld EllipticAxisPointsXld elliptic_axis_points_xld (算子)
名称
elliptic_axis_points_xld elliptic_axis_points_xld EllipticAxisPointsXld EllipticAxisPointsXld elliptic_axis_points_xld — 被视为点云的等值椭圆或多边形的参数。
签名
Herror elliptic_axis_points_xld (const Hobject XLD , double* Ra , double* Rb , double* Phi )
Herror T_elliptic_axis_points_xld (const Hobject XLD , Htuple* Ra , Htuple* Rb , Htuple* Phi )
void EllipticAxisPointsXld (const HObject& XLD , HTuple* Ra , HTuple* Rb , HTuple* Phi )
HTuple HXLD ::EllipticAxisPointsXld (HTuple* Rb , HTuple* Phi ) const
double HXLD ::EllipticAxisPointsXld (double* Rb , double* Phi ) const
def elliptic_axis_points_xld (xld : HObject) -> Tuple[Sequence[float], Sequence[float], Sequence[float]]
def elliptic_axis_points_xld_s (xld : HObject) -> Tuple[float, float, float]
描述
算子 elliptic_axis_points_xld elliptic_axis_points_xld EllipticAxisPointsXld EllipticAxisPointsXld EllipticAxisPointsXld elliptic_axis_points_xld calculates the radii
(Ra Ra Ra Ra ra ra , Rb Rb Rb Rb rb rb ) and the orientation (Phi Phi Phi Phi phi phi , in radians)
of the ellipse
having the same orientation and the same aspect ratio as the point cloud
given by the contour or polygon
XLD XLD XLD XLD XLD xld (i.e., the order of the points in the contour or
polygon is not taken into account). If the contour or
polygon is closed (end point = start point), the end point of the contour or
polygon is not taken into account to avoid that it receives twice
the weight of the other points.
Calculation:
If the moments
,
and
are normalized to the area (see moments_points_xld moments_points_xld MomentsPointsXld MomentsPointsXld MomentsPointsXld moments_points_xld ),
the major radius Ra Ra Ra Ra ra ra and the minor radius Rb Rb Rb Rb rb rb are calculated
as:
The orientation Phi Phi Phi Phi phi phi , i.e., the angle between the major axis
and the x (column) axis, is defined by:
elliptic_axis_points_xld elliptic_axis_points_xld EllipticAxisPointsXld EllipticAxisPointsXld EllipticAxisPointsXld elliptic_axis_points_xld should be used if the contour XLD XLD XLD XLD XLD xld
intersects itself or if it is not possible to close the contour using a line
from end to start point without self-intersection, because in this case
elliptic_axis_xld elliptic_axis_xld EllipticAxisXld EllipticAxisXld EllipticAxisXld elliptic_axis_xld does not produce useful results.可使用 test_self_intersection_xld test_self_intersection_xld TestSelfIntersectionXld TestSelfIntersectionXld TestSelfIntersectionXld test_self_intersection_xld 检测轮廓或多边形是否自相交。
如果传递多个轮廓或多边形,结果将按其在 XLD XLD XLD XLD XLD xld 中的顺序存储为元组。
执行信息
多线程类型:可重入(与非独占算子并行运行)。
多线程作用域:全局(可从任何线程调用)。
在元组级别上自动并行化。
参数
XLD XLD XLD XLD XLD xld (输入对象) xld(-array) → object HXLD HObject HXLD Hobject
待检查的轮廓或多边形。
Ra Ra Ra Ra ra ra (输出控制) real(-array) → HTuple Sequence[float] HTuple Htuple (real) (double ) (double ) (double )
Major radius.
Assertion:
Ra >= 0.0
Rb Rb Rb Rb rb rb (输出控制) real(-array) → HTuple Sequence[float] HTuple Htuple (real) (double ) (double ) (double )
Minor radius.
Assertion:
Rb >= 0.0 && Rb <= Ra
Phi Phi Phi Phi phi phi (输出控制) angle.rad(-array) → HTuple Sequence[float] HTuple Htuple (real) (double ) (double ) (double )
Angle between the major axis and the column axis
(radians).
Assertion:
- pi / 2 < Phi && Phi <= pi / 2
复杂度
设 n 为轮廓或多边形的点数。则运行时间为 O(n)。
结果
elliptic_axis_points_xld elliptic_axis_points_xld EllipticAxisPointsXld EllipticAxisPointsXld EllipticAxisPointsXld elliptic_axis_points_xld 在输入不为空时返回 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>) 。如有必要,则抛出异常。
可能的前趋
gen_contours_skeleton_xld gen_contours_skeleton_xld GenContoursSkeletonXld GenContoursSkeletonXld GenContoursSkeletonXld gen_contours_skeleton_xld ,
edges_sub_pix edges_sub_pix EdgesSubPix EdgesSubPix EdgesSubPix edges_sub_pix ,
threshold_sub_pix threshold_sub_pix ThresholdSubPix ThresholdSubPix ThresholdSubPix threshold_sub_pix ,
gen_contour_polygon_xld gen_contour_polygon_xld GenContourPolygonXld GenContourPolygonXld GenContourPolygonXld gen_contour_polygon_xld ,
test_self_intersection_xld test_self_intersection_xld TestSelfIntersectionXld TestSelfIntersectionXld TestSelfIntersectionXld test_self_intersection_xld
可能的后继
area_center_points_xld area_center_points_xld AreaCenterPointsXld AreaCenterPointsXld AreaCenterPointsXld area_center_points_xld ,
gen_ellipse_contour_xld gen_ellipse_contour_xld GenEllipseContourXld GenEllipseContourXld GenEllipseContourXld gen_ellipse_contour_xld
替代
elliptic_axis_xld elliptic_axis_xld EllipticAxisXld EllipticAxisXld EllipticAxisXld elliptic_axis_xld ,
smallest_rectangle2 smallest_rectangle2 SmallestRectangle2 SmallestRectangle2 SmallestRectangle2 smallest_rectangle2
另见
moments_xld moments_xld MomentsXld MomentsXld MomentsXld moments_xld ,
smallest_circle_xld smallest_circle_xld SmallestCircleXld SmallestCircleXld SmallestCircleXld smallest_circle_xld ,
smallest_rectangle1_xld smallest_rectangle1_xld SmallestRectangle1Xld SmallestRectangle1Xld SmallestRectangle1Xld smallest_rectangle1_xld ,
smallest_rectangle2_xld smallest_rectangle2_xld SmallestRectangle2Xld SmallestRectangle2Xld SmallestRectangle2Xld smallest_rectangle2_xld ,
shape_trans_xld shape_trans_xld ShapeTransXld ShapeTransXld ShapeTransXld shape_trans_xld
参考文献
R. Haralick, L. Shapiro
“Computer and Robot Vision”
Addison-Wesley, 1992, pp. 73-75
模块
基础