Application noteChecking fill level and caps on bottles and jars
The short answer
Use a backlight behind the bottles. The liquid surface and the cap show as clear dark shapes against the light, so level, presence and tilt become simple edge measurements.
- Technique
- Backlight
- Industries
- Packaging and labels, Pharma and food


What the camera sees
Camera views are simulated: the part and the lights are modelled, then rendered as a monochrome camera would see them.

Front lightBacklightThe problem
Every bottle on the line must be filled to the right height and closed with a cap that is on, straight and fully down. Under front light, clear glass and plastic reflect the light as bright streaks, the liquid surface is only a faint change in tint, and the result changes with the colour of the product and the label.
Why it works
With the light behind the bottles, the camera sees what the light passes through. Glass and clear plastic let it through; the liquid absorbs and bends part of it; and the surface of the liquid, the meniscus, bends it away from the lens and shows as a dark line. The level is the height of that line. The cap is a solid silhouette, so a missing, high or tilted cap changes its outline. And with no light in front, there are no reflections from the front.
How to set it up
- Place a backlight larger than the zone you check behind the line, with the camera opposite it.
- For the level, look where the liquid surface sits, in the neck or the shoulder, and measure the meniscus line rather than the top of the tint.
- For caps, measure the height and angle of the cap's outline against the bottle's own neck or shoulder.
- Dark products block most of the light. They still show a sharp level, but opaque containers need another method.
- Strobe the light and keep exposures short on fast lines, so a moving surface stays sharp.
What usually goes wrong
- A front light, which puts bright streaks on the glass and leaves the level a faint change in tint.
- Foam on top of the liquid, which hides the meniscus. Read the level below the foam, or after it settles.
- A backlight smaller than the bottles in view, so the neck or the cap sits over the dim border of the panel.
Lights for this job
More application notes

Backlight
Checking tablets in blister pockets before sealingLight the clear forming web from below with a backlight.
Dark field
Finding cracks and chips in glass vialsUse dark-field lighting: light the glass from a low angle against a black background.
Directional
Reading barcodes and labels under glossy film or tapeLight from the side with a bar light, at an angle that sends the mirror reflection from the film away from the lens..
Tell us what you need to see.
Describe the part, the defect and the working distance. An engineer replies with the light, or designs one.

