smallest_circle_xldsmallest_circle_xldSmallestCircleXldSmallestCircleXldsmallest_circle_xld (算子)
名称
smallest_circle_xldsmallest_circle_xldSmallestCircleXldSmallestCircleXldsmallest_circle_xld — 轮廓或多边形的最小包围圆。
签名
Herror smallest_circle_xld(const Hobject XLD, double* Row, double* Column, double* Radius)
Herror T_smallest_circle_xld(const Hobject XLD, Htuple* Row, Htuple* Column, Htuple* Radius)
def smallest_circle_xld(xld: HObject) -> Tuple[Sequence[float], Sequence[float], Sequence[float]]
def smallest_circle_xld_s(xld: HObject) -> Tuple[float, float, float]
描述
算子 smallest_circle_xldsmallest_circle_xldSmallestCircleXldSmallestCircleXldSmallestCircleXldsmallest_circle_xld determines the smallest
enclosing circle of contours or polygons, i.e., the circle with the smallest
area of all circles containing the contour. For this circle the center
(RowRowRowRowrowrow,ColumnColumnColumnColumncolumncolumn) and the radius (RadiusRadiusRadiusRadiusradiusradius)
are calculated.
If several contours or polygons are passed in XLDXLDXLDXLDXLDxld corresponding
tuples are returned as output parameter.
In case of empty contours all parameters have the value 0.0 if no other
behavior was set (see set_systemset_systemSetSystemSetSystemSetSystemset_system).
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 在元组级别上自动并行化。
参数
XLDXLDXLDXLDXLDxld (输入对象) xld(-array) → objectHXLDHObjectHXLDHobject
待检查的轮廓或多边形。
RowRowRowRowrowrow (输出控制) circle.center.y(-array) → HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
Row coordinate of the center of the enclosing
circle.
ColumnColumnColumnColumncolumncolumn (输出控制) circle.center.x(-array) → HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
Column coordinate of the center of the enclosing
circle.
RadiusRadiusRadiusRadiusradiusradius (输出控制) circle.radius(-array) → HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
Radius of the enclosing circle.
Assertion:
Radius >= 0
复杂度
If N is the number of contour points then the runtime complexity is
O(N*ln(N)).
结果
算子 smallest_circle_xldsmallest_circle_xldSmallestCircleXldSmallestCircleXldSmallestCircleXldsmallest_circle_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_xldgen_contours_skeleton_xldGenContoursSkeletonXldGenContoursSkeletonXldGenContoursSkeletonXldgen_contours_skeleton_xld,
edges_sub_pixedges_sub_pixEdgesSubPixEdgesSubPixEdgesSubPixedges_sub_pix,
threshold_sub_pixthreshold_sub_pixThresholdSubPixThresholdSubPixThresholdSubPixthreshold_sub_pix,
gen_contour_polygon_xldgen_contour_polygon_xldGenContourPolygonXldGenContourPolygonXldGenContourPolygonXldgen_contour_polygon_xld
可能的后继
gen_ellipse_contour_xldgen_ellipse_contour_xldGenEllipseContourXldGenEllipseContourXldGenEllipseContourXldgen_ellipse_contour_xld
替代
smallest_rectangle1_xldsmallest_rectangle1_xldSmallestRectangle1XldSmallestRectangle1XldSmallestRectangle1Xldsmallest_rectangle1_xld,
smallest_rectangle2_xldsmallest_rectangle2_xldSmallestRectangle2XldSmallestRectangle2XldSmallestRectangle2Xldsmallest_rectangle2_xld
另见
elliptic_axis_xldelliptic_axis_xldEllipticAxisXldEllipticAxisXldEllipticAxisXldelliptic_axis_xld,
smallest_rectangle1_xldsmallest_rectangle1_xldSmallestRectangle1XldSmallestRectangle1XldSmallestRectangle1Xldsmallest_rectangle1_xld,
smallest_rectangle2_xldsmallest_rectangle2_xldSmallestRectangle2XldSmallestRectangle2XldSmallestRectangle2Xldsmallest_rectangle2_xld,
shape_trans_xldshape_trans_xldShapeTransXldShapeTransXldShapeTransXldshape_trans_xld
模块
基础