Max
Max

Reputation: 3

Edge Detection cv2 on bubbles

I have problems to do a proper edge detection on the following picture. My goal is to get an edge detecion arround every individual bubble. I used Canny edge detection from cv2, the bubbles that are to close together are merged. Do you have any idea how i can detect any individual bubble?

Thanks best regards

Hight Profile Edge Detection

file

Upvotes: 0

Views: 190

Answers (1)

Fravij99
Fravij99

Reputation: 11

I used this methodology to segment bubbles in a liquid foam:

  1. Preprocessing of the image applying median filter.
  2. Computing binary threshold using iterative Otsu's method.
  3. Binarization of the image.
  4. Masking the binarizated image by
    labels = measure.label(binary, connectivity=2)
    props = measure.regionprops(labels)
    
  5. Detecting diameters of the images using prop.equivalent_diameter.

Upvotes: 1

Related Questions