hi, i would like to know how I can find out all circles in attached image.

1 view (last 30 days)
hi, i would like to know how I can find out all circles in attached image. My problem is that the image has not clear background. Thanks

Accepted Answer

Image Analyst
Image Analyst on 24 Nov 2015
Try imfindcircles(). If that doesn't work then try a top hat, bottom hat filter, stdfilt(), or a difference of Gaussians filter. Then threshold that, do a hole fill, label it, and call regionprops asking for equivDiameter
filteredImage = imtophat(grayImage........ % Or whatever filter works to find the edges.
binaryImage = filteredImage < 100; % Whatever
labeledImage = bwlabel(binaryImage);
measurements = regionprops(labeledImage, 'EquivDiameter');
allDiameters = [measurements.EquivDiameter];

More Answers (0)

Community Treasure Hunt

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

Start Hunting!