
Detecting Bubbles Using Image Segmentation
11 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I'd like to segment an image similar to the following in order to count the number of "bubbles".

So far, I've tried removing the background mesh using enthropyfilt, and then I used the Canny edge detecting method to find the edges. After this I used imdilate with line structures to get:

This looks reasonably close to what I want, but there are still a lot of regions that don't close, so imfill doesn't give me exactly what I want:

Does anyone have any experience doing similar image processing?
0 commentaires
Réponses (2)
Ahmet Cecen
le 2 Mai 2015
Modifié(e) : Ahmet Cecen
le 2 Mai 2015
Here is what worked for me for the above image:
1) Crop the scale bar.
2) Remove the shadow gradient.
3) Simple thresholding based on histogram.
4) Remove any connected components smaller than 100 Pixels.
5) Imfill the holes, including the regions that are bounded by the image borders. (Create a routine that adds a line of 1s outside the borders, 1 border at a time, then fill.)
6) Close the image with a 1 radius disk.
This I did in 2 minutes, no more time to improve on this, but I think you can take it from there, below is what it looks like at step 6. You can alter the parameters at different steps if you want each bubble to look as seperate as possible etc.

1 commentaire
GERARDO TAPIA
le 10 Mar 2020
excellent job, could you help me with the code to understand better the image processing. I will really apreciate it
Image Analyst
le 1 Mai 2015
Try marker controlled watershed segmentation. See Steve's demo: http://www.mathworks.com/help/images/examples/marker-controlled-watershed-segmentation.html
0 commentaires
Voir également
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!