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 Any The image to be analyzed for circular shapes.

πŸ“€ Outputs

  • Result Annotated image with detected circles drawn.

  • Positions List of circle center coordinates (x, y) found in the image.

  • Number of Circles Count of detected circles.

  • Circles Detailed circle shapes (center and radius) for downstream processing.

πŸ•ΉοΈ Controls

  • dp Inverse ratio of the accumulator resolution to the image resolution (affects detection sensitivity and scale handling).

  • Edge Detection Controls the internal edge detection sensitivity used for circle finding.

  • Threshold Controls the accumulator threshold that decides whether a candidate circle is accepted.

  • Min Distance Minimum 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

  1. Feed an image into the Image Any input.

  2. Use Min Radius (% width) and Max Radius (% width) to limit detections to the expected object size range.

  3. Adjust Edge Detection and Threshold to reduce false positives or recover missed circles.

  4. Inspect results visually via the Result output and use Positions or Circles for automation or counting.

πŸ’‘ Tips and Tricks

  • Preprocess noisy images with Blur or Denoising to reduce spurious detections and smooth edges.

  • If objects of interest occupy only part of the scene, crop with Image ROI Select before detection to speed up processing and reduce false positives.

  • Use Image Resize to speed up detection during parameter tuning, then switch back to full resolution for final runs.

  • Combine with Image Threshold or Morphological Transformations to enhance clear circular edges when contrast is low.

  • Validate or filter detections by combining outputs with Blob Detector or Find Contour to confirm shape or area properties.

  • Overlay results for presentation using Draw Detections and inspect them with Show Image for 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 Detection or lower Threshold; ensure Min Radius and Max Radius include the true object size.

  • Many false positives: raise Threshold or increase Min Distance to prevent duplicate/close detections; try Image Threshold or Morphological Transformations to clean the image.

  • Overlapping/duplicate detections: increase Min Distance so candidate centers must be farther apart.

  • Slow processing: reduce image size with Image Resize or limit the search area with Image ROI Select.

  • Inconsistent results under different lighting: try Adjust Colors or use Blur/Denoising to stabilize input before detection.

Last updated

Was this helpful?