Finding circles in clusters

7 次查看(过去 30 天)
Manny Kins
Manny Kins 2019-4-17
回答: Jayanti 2025-3-27
Cluster1.jpg
I have this image of spherical particles with varying shades. I wanted to find a way to find the centers of all of them (especially the black ones which are in the central cluster).
I have tried using imfindcircles and imadjust but I keep getting either too many false positives or no detection of the inner particles of the cluster due to their poor edge definition. Is there another technique I am missing that will help?
Thanks

回答(1 个)

Jayanti
Jayanti 2025-3-27
Hi Manny,
I have used “imfindcircles” function to detect the circle in the image.
You can refer to the below code for more details:
A= imread('small.jpg');
[centers, radii] = imfindcircles(A,[10 50],'ObjectPolarity','dark','Sensitivity',0.95);
I have kept the radius range to [10 50] and set the object polarity to “dark”. Additionally, I have increased the sensitivity from 0.85(default) to 0.95. As in lower sensitive values it is missing out some of the circles while higher value resulting in false positives.
Below is the output image I am getting:
To get more information on the name value arguments of this function please refer to the below link:

产品


版本

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by