01-06-2014 03:07 PM
How can I determine the liquid level in a bottle (LabView Vision)? Does anybody have an example code? The task is, that if liqid level is between two predetermined level, the program writes, that it is correct else it writes incorrect. Thank you.
01-06-2014 03:18 PM
I would suggest camera, backlight, and using a rake to find the line in a predefined ROI. This is a very simplified answer but is one way to do it with vision. Without MUCH more detail I cant answer this (IE is the bottle clear, what hardware do you have....) there are also other liquid level sensors you can consider in addition to vision.
01-06-2014 03:39 PM
I only open a picture, I don't use camera, camcorder, etc. I have attached an example picture.
01-07-2014 02:05 AM - edited 01-07-2014 02:07 AM
Well, reading the first part of the subject I would have proposed a balance.....
Doing it with a camera/picture is easy when you have a reproducible setup.
And since you measure with light, you should have the best possible control over the light.
You want a good contrast...
Will the bottle always be of the same type/shape?
Will the liquid always be the same (transparent/water?)
Can you place it always at the same position?
Play with different backgrounds / lightsources
Next is the software: There is a vision addon for labview to program the detection.
Usual steps:
detect bottle
align to bottle
detect level ( detect a horizontal line (contrast change) in a field of view )
EDIT: Usually you try to have a good focus 😉
01-07-2014 02:46 AM
For image analysis applications, at least 50% of the functionality is already provided by the way of the image aquisition.
As the previous posters already pointed out, you have to make sure that the image has the best focus you can achieve in terms of:
- Contrast
- Sharpness
- Resolution
- Size
To be more precise on "Resolution": You dont need the highest resolution. You need a camera with sufficient resolution in order to acquire images which are not blurry.
"Size" refers to the fact that you want to acquire only the object of interest, in your case the bottle. Anything else is waste of data and resolution, hence you have to make sure that your optics alow to zoom in on the bottle only.
Contrast is usually best achieved by proper lighting and using a black/white camera only.
hope this helps,
Norbert
01-07-2014 06:46 AM - edited 01-07-2014 06:49 AM
here is a little play with your bad picture:
used only the small field of interest (here a guess) ,
used only the red channel ( takes out most of the light reflection)
grey scale, 3x(blurr, median filter) , played with contrast -gamma - saturation
now you need to add the edge detection and some sort of scale.