how to detect the water line


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.

  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.

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.

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).

Whatever method you use, I would suggest playing around with lighting, background and camera location until it’s easiest to see from the image.

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.

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.

If you could put a colored float in the tubes it will be a lot easier to detect.

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!

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.