Finding Circles and Their Areas

2 vues (au cours des 30 derniers jours)
Nathan
Nathan le 20 Mai 2015
Commenté : Image Analyst le 22 Mai 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.

Réponse acceptée

Image Analyst
Image Analyst le 21 Mai 2015
Try watershed to split it apart.
  5 commentaires
Nathan
Nathan le 22 Mai 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 le 22 Mai 2015
How would cropping off the last two columns on the right get rid of the line on the left?

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by