MATLAB: Finding Circles and Their Areas

image analysisimage processingImage Processing Toolbox

Using some code I have written, I can take an image, remove the background noise, and semi-count up the total number of circles in the image. The problem I am running into is as follows. Bellow is a reference image.
As you can see the code correctly count the majority of the droplets, using the code
[centers, radii] = imfindcircles(bw,[20 20],'Sensitivity',0.99,'Edge',0.03);
I don't want to increase my sensitivity any further, because then it starts counting circlets that aren't droplets.
I also tried counting the number of objects in the picture, but the problem then becomes that it starts counting that thin sliver of white space on the very right edge of the image. Also this does not help me find the area of all of the circles. Right now I am using the code
cc = bwconncomp(bw, 8);
dropdata = regionprops(cc, 'Area');
dropArea=[dropdata.Area];
But since this is only counting the are of the objects, it counts the area of the entire stream and the drop of the first object, while I just want it to count the area of the drop on the end. Any help would be greatly appreciated.

Best Answer

Try watershed to split it apart.
Related Question