Detecting Bubbles Using Image Segmentation

21 Ansichten (letzte 30 Tage)
Lukas Bystricky
Lukas Bystricky am 1 Mai 2015
Kommentiert: GERARDO TAPIA am 10 Mär. 2020
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?

Antworten (2)

Ahmet Cecen
Ahmet Cecen am 2 Mai 2015
Bearbeitet: Ahmet Cecen am 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 Kommentar
GERARDO TAPIA
GERARDO TAPIA am 10 Mär. 2020
excellent job, could you help me with the code to understand better the image processing. I will really apreciate it

Melden Sie sich an, um zu kommentieren.


Image Analyst
Image Analyst am 1 Mai 2015
Try marker controlled watershed segmentation. See Steve's demo: http://www.mathworks.com/help/images/examples/marker-controlled-watershed-segmentation.html

Kategorien

Mehr zu Images finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by