Circle Detector
Detect circle patterns in an image and get visual and numeric details about found circles. This block is tuned for circular features (e.g., circular parts, holes, round markers) and exposes intuitive sliders to adapt detection sensitivity and size ranges.
π₯ Inputs
Image AnyThe image to be analyzed for circular shapes.
π€ Outputs
ResultAnnotated image with detected circles drawn.PositionsList of circle center coordinates (x, y) found in the image.Number of CirclesCount of detected circles.CirclesDetailed circle shapes (center and radius) for downstream processing.
πΉοΈ Controls
dpInverse ratio of the accumulator resolution to the image resolution (affects detection sensitivity and scale handling).Edge DetectionControls the internal edge detection sensitivity used for circle finding.ThresholdControls the accumulator threshold that decides whether a candidate circle is accepted.Min DistanceMinimum distance between circle centers (helps avoid duplicate detections).Min Radius (% width)Minimum radius to consider, defined as a percentage of image width.Max Radius (% width)Maximum radius to consider, defined as a percentage of image width.
Adjust these controls interactively to tune detection for your specific camera, lighting and object sizes.
βοΈ How it runs
When the block receives an image, it converts the image to grayscale (visual preprocessing) and searches for circular patterns based on the current slider settings. Detected circles are drawn onto a copy of the image and the block outputs the annotated image, the list of center positions, the total count, and the circle shapes (center + radius) for further processing.
β¨ Features
Real-time adjustable sliders for quick parameter tuning.
Outputs both visual results and structured data (positions, counts, circle shapes).
Radius parameters expressed as percentages make it easy to adapt across different image sizes.
Avoids duplicate detections using a configurable minimum center distance.
π Usage
Feed an image into the
Image Anyinput.Use
Min Radius (% width)andMax Radius (% width)to limit detections to the expected object size range.Adjust
Edge DetectionandThresholdto reduce false positives or recover missed circles.Inspect results visually via the
Resultoutput and usePositionsorCirclesfor automation or counting.
π‘ Tips and Tricks
Preprocess noisy images with
BlurorDenoisingto reduce spurious detections and smooth edges.If objects of interest occupy only part of the scene, crop with
Image ROI Selectbefore detection to speed up processing and reduce false positives.Use
Image Resizeto speed up detection during parameter tuning, then switch back to full resolution for final runs.Combine with
Image ThresholdorMorphological Transformationsto enhance clear circular edges when contrast is low.Validate or filter detections by combining outputs with
Blob DetectororFind Contourto confirm shape or area properties.Overlay results for presentation using
Draw Detectionsand inspect them withShow Imagefor a larger preview window.
Recommended common pipelines:
For small circular markers:
Image ROI SelectβBlurβ this block βDraw DetectionsβShow Image.For low-contrast rings:
Adjust ColorsβImage ThresholdβMorphological Transformationsβ this block.
π οΈ Troubleshooting
No circles detected: increase
Edge Detectionor lowerThreshold; ensureMin RadiusandMax Radiusinclude the true object size.Many false positives: raise
Thresholdor increaseMin Distanceto prevent duplicate/close detections; tryImage ThresholdorMorphological Transformationsto clean the image.Overlapping/duplicate detections: increase
Min Distanceso candidate centers must be farther apart.Slow processing: reduce image size with
Image Resizeor limit the search area withImage ROI Select.Inconsistent results under different lighting: try
Adjust Colorsor useBlur/Denoisingto stabilize input before detection.
Last updated
Was this helpful?