The operator smallest_circlesmallest_circleSmallestCircleSmallestCirclesmallest_circle determines the smallest
surrounding circle of a region, i.e., the circle with the smallest
area of all circles containing the region. For this circle the
center (RowRowRowrowrow,ColumnColumnColumncolumncolumn) and the radius
(RadiusRadiusRadiusradiusradius) are calculated. The operator is applied when,
for example, the location and size of circular objects (e.g.,
coins) which, however, are not homogeneous inside or have broken
edges due to bad segmentation, has to be determined. The output of
the operator is selected in such a way that it can be used as input
for the operators disp_circledisp_circleDispCircleDispCircledisp_circle and
gen_circlegen_circleGenCircleGenCirclegen_circle.
In the documentation of this chapter (Regions / Features), you can
find an image illustrating regions with varying outer and inner radii.
Internally, the calculation is based on the center coordinates of
the region pixels. To take into account that pixels are not just
infinitely small points but have a certain area, the calculated
radius is enlarged by 0.5 before it is returned in
RadiusRadiusRadiusradiusradius. This, in most cases, gives acceptable results.
However, in the worst case (pixel diagonal) this enlargement is not
sufficient. If one wants to ensure that the border of the input
region completely lies within the circle, one had to enlarge the
radius by instead of 0.5. Consequently,
the value returned in RadiusRadiusRadiusradiusradius must be corrected by
. However, this would also be only
an upper bound, i.e., the circle with the corrected radius would be
slightly too big in most cases.
The smallest surrounding circle of a region. Note that the
calculation is based on the center coordinates of the region pixels
and that 0.5 is added to the resulting radius.
Execution Information
Multithreading type: reentrant (runs in parallel with non-exclusive operators).
Multithreading scope: global (may be called from any thread).