1. Bubble Character Analysis using Image Processing Methods
Guangshen Ma, Ziyao Wang, Yihui Feng, Minwoo Kim
Duke University
Introduction
The goal of this project is to process the bubble images using image
processing algorithms so that we can easily study the dynamics
properties of bubbles. In order to further analyze bubble’s
characters such as velocity and trajectory path, interactive
segmentation and bubble region detection algorithms can be used to
detect the bubble position and to extract its physical information.
Then, image inpainting algorithm is used to focus on a single
bubble of interest. Also, the bubble’s penetration depth and
departure frequency are measured with our methods.
1. Preprocess raw images
2. Measure penetration depth
3. Estimate bubble’s departure frequency
4. Inpaint the damaged image
5. Segment out a single bubble using interactive segmentation
6. Detect the bubble region
Algorithm and results
1. Preprocessing
A. Background processing: Subtract pure background image from bubble image.
B. Grayscale processing: Change the RGB color image to gray image.
C. Binary processing: Identify bubble shape by binarization.
D. Bubble padding: Filling holes inside bubble regions.
E. Canny edge detection: Detect the edge using Canny-edge detector.
Algorithm and results
Further work includes developing algorithms of bubble ellipse reconstruction using
Hough transform and using methods of Gray-level Co-occurrence Matrix for flow regime
classification.
Algorithm and results
Future work
5. Interactive segmentation
To study the behavior of a single bubble, we segment out the bubble
of interest from the rest of the other bubbles.
A. Provide hints of samples for foreground and background by
marking connected lines as in the right figure. These samples
form sample distribution for the foreground and background.
B. From the user-provided samples, estimate the conditional
probability densities ! " ℱ), ! " ℬ) for foreground and
background. To resolve non-smoothness and sparsity of the
densities, use nonparametric smoothing technique to smooth
these densities. Use kernel smoothing with Epanechnikov kernel.
C. For every pixel in the image, compute the probability of how
each pixel is likely to be the foreground or background using
Bayes’s rule, i.e., ! ℱ ") =
((*|ℱ)
( ℱ ⋅((*|ℱ)-( ℬ ⋅((*|ℬ)
.
D. For each pair of pixels (x,y) in the image, measure the distance
between two points regarding how likely two points belong to
the same group. Specifically, compute geodesic distance defined
by . ", / = min
34,5
∫ |7 8 ⋅ 9:*,; 8 |
;
*
, where 7 8 =
9! ℱ 8) and :*,; 8 is any arbitrary path from pixel " to /.
E. Computing . ", / for each pair of pixels reduces to computing
shortest path in a discretized image space with 4-neighbour
scheme. Use Dijstra’s single source shortest path algorithm to
compute all the distances, which takes time complexity of
=(> log >), where > is the total number of pixels in the image.
F. Based on the user-provided samples and computed distances,
determine whether a given pixel " is more likely to belong to the
foreground or background.4. Image inpainting
In order to recover the original image after segmenting the single bubble, we need to
inpaint the regions where all the other bubbles are removed.
A. Detect all the bubbles using edge detection techniques
B. Remove all the bubbles from the image except the selected one.
C. Inpaint the removed regions B by solving ∆D = 0 over B with Dirichlet boundary
condition.
2. Penetration depth
The penetration depth is defined as the bubble’s
penetrating distance along the upper edge of the
nozzle, which is a significant feature for bubbles
that is determined by different diameters of
nozzle and fluid speed.
A. Use Canny-edge detector to process binary
images and choose proper threshold to
generate clear edge of the first bubble.
B. Use loops to find peak values in a set of
bubble images
3. Departure frequency
Bubble departure frequency is the rate of
generating new bubbles from the nozzle.
A. Use Canny-edge detector to find the upper
horizontal edge of the nozzle, using an
imaginary horizontal line for scanning.
B. Detect the moment when each bubble just
separates from the nozzle by sweeping the
scan line.
C. Based on the recorded separated points,
calculate the number of images between two
seperated moments to get departure
frequency.
6. Bubble detection
The goal of this algorithm is to detect the
position of the region of bubble by labeling
the connection components. This method is
useful for further extracting the property
information in bubble images.
A. After image preprocessing, the
connected components of the binary
image is labeled with arbitrary numbers
(“1” to “8”).
B. With the labeled binary image, the
numbers are reindexed based on the
barycenter of the bubble from bottom to
top. Therefore, the positions and regions
of the bubbles are easily detected.
Objectives