how to detect the water line

Discussion related to "under the hood" OpenMV topics.
sinside
Posts: 4
Joined: Tue May 22, 2018 1:13 am

how to detect the water line

Postby sinside » Wed Jul 11, 2018 2:48 am

Hello,

I am new to openmv. I am using openmv for below application which i need to detect the waterline in the picture.
could anyone tell me how i can do that? Thanks in advance.
Note:
1. the background may change all the time
2. and the water in tube is increasing,
3. i need to send out the signal(e.g. pull down some IO) when the openmv detect the waterline reach some point.
4. sometimes, foam exist in the tube if the water is not clean, and how can i detect the waterline in this case.
2_1.jpg
2_1.jpg (166.35 KiB) Viewed 216 times
1_1.jpg
1_1.jpg (193.39 KiB) Viewed 216 times
User avatar
kwagyeman
Posts: 2195
Joined: Sun May 24, 2015 2:10 pm

Re: how to detect the water line

Postby kwagyeman » Wed Jul 11, 2018 12:09 pm

Color tracking is the easiest thing to do for this... however, it's very hard to do given you don't have much contrast in the scene...

How do you plan to mount the camera? Looking at the tubes from this direction? Can you possibly put some sort of background behind the tubes? And maybe color the water? Or color the tubes? It's hard to see the water line otherwise.
Nyamekye,
User avatar
mechatronicsguy
Posts: 5
Joined: Wed Jul 11, 2018 12:57 am
Location: Sydney
Contact:

Re: how to detect the water line

Postby mechatronicsguy » Wed Jul 11, 2018 7:13 pm

I'd also suggest looking at the side edges of the tube, rather than the meniscus in front.

In your photo the empty portion of the tube appears to be reflecting a white object located to the left. That reflection is not present when the water is there (and changes the refractive index).
tube edge v02.png
tube edge v02.png (136.91 KiB) Viewed 205 times
Whatever method you use, I would suggest playing around with lighting, background and camera location until it's easiest to see from the image.
sinside
Posts: 4
Joined: Tue May 22, 2018 1:13 am

Re: how to detect the water line

Postby sinside » Thu Jul 12, 2018 9:58 pm

kwagyeman wrote:
Wed Jul 11, 2018 12:09 pm
Color tracking is the easiest thing to do for this... however, it's very hard to do given you don't have much contrast in the scene...

How do you plan to mount the camera? Looking at the tubes from this direction? Can you possibly put some sort of background behind the tubes? And maybe color the water? Or color the tubes? It's hard to see the water line otherwise.
Thanks for the reply. I will start with color tacking.

Since it's still an idea, i don't have the integrated sample right now. Please see below picture for the tubes and camera position.
1. The background may change all the time because the cover is transparent, and i can't change the color of the cover.
2. In fact, the liquid is not the water, so the color is not fixed, but mostly it's colorless and transparent.
3. I will check if we can find the tube with color, and it may take time.
3.jpg
3.jpg (1.64 MiB) Viewed 197 times
User avatar
kwagyeman
Posts: 2195
Joined: Sun May 24, 2015 2:10 pm

Re: how to detect the water line

Postby kwagyeman » Fri Jul 13, 2018 12:51 am

Okay, when you have some pictures from the camera's point of view I'll be able to help more. Note that what you are trying to do is very hard... even with a CNN it's still hard.
Nyamekye,
User avatar
iabdalkader
Posts: 524
Joined: Sun May 24, 2015 3:53 pm

Re: how to detect the water line

Postby iabdalkader » Fri Jul 13, 2018 8:33 am

If you could put a colored float in the tubes it will be a lot easier to detect.
sinside
Posts: 4
Joined: Tue May 22, 2018 1:13 am

Re: how to detect the water line

Postby sinside » Sun Jul 15, 2018 9:28 pm

kwagyeman wrote:
Fri Jul 13, 2018 12:51 am
Okay, when you have some pictures from the camera's point of view I'll be able to help more. Note that what you are trying to do is very hard... even with a CNN it's still hard.
OK, I will send you the picture when the sample is ready. Maybe we can't find other way to have better result at that time.

Thanks again for your feedback!
sinside
Posts: 4
Joined: Tue May 22, 2018 1:13 am

Re: how to detect the water line

Postby sinside » Sun Jul 15, 2018 9:41 pm

iabdalkader wrote:
Fri Jul 13, 2018 8:33 am
If you could put a colored float in the tubes it will be a lot easier to detect.
I can't add float in the tubes, the liquid in the tubes are different chemical reagents, the float may change its chemical composition. Thank you very much for the suggestion, it provides me a broader idea to solve this problem rather than just focusing the system itself.

Return to “Technical Discussion”

Who is online

Users browsing this forum: No registered users and 6 guests