Detect circles

Detect circles

Detects circles in point sets. This tool can detect an arbitrary number of circles in boundary curves or other point sets. It can be used to accurately detect the location of circular objects, even when they overlap.

The input to this tool can come from any tool that finds point sets in images, such as BoundaryFindingTool, GradientFindingTool or even DetectCornersTool.

Inputs

points
The (x, y) coordinates of detected points in world coordinates (a N-by-2 matrix). The points may be in arbitrary order.
limits
If the points can be grouped to sets so that each circle is composed of points in one set only, this input gives the end indices of each distinct set in the points matrix. For example, if BoundaryFindingTool is used to detect the points, its limits output can be connected here to ease the task of the circle detection algoritm.
minRadius
The minimum radius of a circle, in world coordinates.
maxRadius
The maximum radius of a circle, in world coordinates.
maxCirclesPerSet
The maximum number of detections in each set. If limits is not connected, this is the total maximum number of circles detected.
radialTolerance
The relative amount of variation allowed in radial direction. For example, if this value is set to 0.05, then all points that are within 5% of the estimated circle radius will be regarded as part of the circle.
angularTolerance
The relative amount of missing points tolerated with respect to the circumfence of the current circle. For example, if this value is set to 0.5, then a detection is only accepted if there are at least 0.5 * 2 * pi * r points within radialTolerance.

Outputs

circles
Centers and radii of found circles as an N-by-3 matrix. Each row stores the world coordinates (x, y) of the center of a circle and its radius.