Finding Circles and Their Areas

3 views (last 30 days)
Nathan
Nathan on 20 May 2015
Commented: Image Analyst on 22 May 2015
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.

Accepted Answer

Image Analyst
Image Analyst on 21 May 2015
Try watershed to split it apart.
  5 Comments
Nathan
Nathan on 22 May 2015
For removing the white line on the left I just decided to drop the last two columns of my bw image, so now that problem is solved.
Image Analyst
Image Analyst on 22 May 2015
How would cropping off the last two columns on the right get rid of the line on the left?

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!