Having imfindcircles not to detect arc in an image

7 Ansichten (letzte 30 Tage)
Dang Dang
Dang Dang am 5 Okt. 2021
Beantwortet: Jayanti am 13 Mai 2025
Hi all,
I have been trying to find only circles in my images, but often imfindcircles would detect arc and aggregation of circle like the image below. Please let me know if there is away to work around it.
  1 Kommentar
Sahil Jain
Sahil Jain am 20 Okt. 2021
Since all the aggregated circles detected have a rather large radius, you can try reducing the maximum limit of the "radiusRange" parameter of the "imfindcircles" function.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Jayanti
Jayanti am 13 Mai 2025
Hi,
Please refer to the below code which can detect circles for the provided image:
I=imread('your_file');
[centers, radii] = imfindcircles(I,[1 60],'ObjectPolarity','bright');
imshow(I)
viscircles(centers, radii,'EdgeColor','b');
I have set the radius range to [1, 60] to capture smaller-sized circles that are present in the image. Set the object polarity to “bright” as the circular object is brighter compared to the background of the image. With these settings, “imfindcircles” is able to detect the circles effectively.

Produkte


Version

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by