Skip to content

smallest_circle_xldSmallestCircleXldSmallestCircleXldsmallest_circle_xldsmallest_circle_xld🔗

Short description🔗

smallest_circle_xldSmallestCircleXldSmallestCircleXldsmallest_circle_xldsmallest_circle_xld — Smallest enclosing circle of contours or polygons.

Signature🔗

smallest_circle_xld( xld XLD, out circle.center.y Row, out circle.center.x Column, out circle.radius Radius )void SmallestCircleXld( const HObject& XLD, HTuple* Row, HTuple* Column, HTuple* Radius )static void HOperatorSet.SmallestCircleXld( HObject XLD, out HTuple row, out HTuple column, out 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]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 )

void HXLD::SmallestCircleXld( HTuple* Row, HTuple* Column, HTuple* Radius ) const

void HXLD::SmallestCircleXld( double* Row, double* Column, double* Radius ) const

void HXLD.SmallestCircleXld( out HTuple row, out HTuple column, out HTuple radius )

void HXLD.SmallestCircleXld( out double row, out double column, out double radius )

Description🔗

The operator smallest_circle_xldSmallestCircleXld 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 (Rowrowrow,Columncolumncolumn) and the radius (Radiusradiusradius) are calculated.

If several contours or polygons are passed in XLDXLDxld 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_systemSetSystem).

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Automatically parallelized on tuple level.

Parameters🔗

XLDXLDxld (input_object) xld(-array) → objectHObjectHXLDHObjectHobject

Contours or polygons to be examined.

Rowrowrow (output_control) circle.center.y(-array) → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Row coordinate of the center of the enclosing circle.

Columncolumncolumn (output_control) circle.center.x(-array) → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Column coordinate of the center of the enclosing circle.

Radiusradiusradius (output_control) circle.radius(-array) → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Radius of the enclosing circle.

Assertion: Radius >= 0

Complexity🔗

If \(N\) is the number of contour points then the runtime complexity is \(O(N*ln(N))\).

Result🔗

The operator smallest_circle_xldSmallestCircleXld returns the value 2 (H_MSG_TRUE) if the input is not empty. If the input is empty the behavior can be set via set_system(::'no_object_result',<Result>:). If necessary, an exception is raised.

Combinations with other operators🔗

Combinations

Possible predecessors

gen_contours_skeleton_xldGenContoursSkeletonXld, edges_sub_pixEdgesSubPix, threshold_sub_pixThresholdSubPix, gen_contour_polygon_xldGenContourPolygonXld

Possible successors

gen_ellipse_contour_xldGenEllipseContourXld

Alternatives

smallest_rectangle1_xldSmallestRectangle1Xld, smallest_rectangle2_xldSmallestRectangle2Xld

See also

elliptic_axis_xldEllipticAxisXld, smallest_rectangle1_xldSmallestRectangle1Xld, smallest_rectangle2_xldSmallestRectangle2Xld, shape_trans_xldShapeTransXld

Module🔗

Foundation