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

find circles in imageimage processingImage Processing Toolboximage segmentation

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

Best Answer

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];
Related Question