Help determining velocity of Bubbles

4 views (last 30 days)
Hi all, I am very new to Matlab and am trying to determine the average velocity of bubbles as they rise against a black background. Same with the flux rate as the bubbles cross a line in the image.
I have about 50 images over the span of a few seconds. I understand the main workflow of what to do: Start by finding the bubbles in each frame, find and match the next bubble to the bubble from the previous frame, calculate the distance that each bubble moved, and then divide by the time between frames. It seems simple enough but I am honestly just not too sure where to start. Any help or examples would be greatly appreciated.

Accepted Answer

Thiago Henrique Gomes Lobato
The main workflow that you gave is right and one of the names this process is known is optical flow. Matlab has some functions that make most of those steps at once (you can check it here:
In case you don't have the image processing you could do a manually implementation of the method. Someone did a good tutorial in matlab that can be found here: .
The main additional thing you will need to do is to average only velocities above a given threshold so your result is not distorted by the points with no bubbles.
For the flux rate you can define an area around your division line and calculate the rate with the speeds in this area.
If you want the most exact result possible you will need to track each ball and average the speeds only in the tracked areas. This can be done by find blobs (how your bubles would be called) with image segmentation techniques, you can check this nice tutorial as a reference .
Nichoals Curci
Nichoals Curci on 19 Apr 2021
That's good to know, I'll check in on some examples of the Lucas-Kanade algorithm. It makes sense using the "closest to the previous position" way of determining movement. Thank you!

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by