Industries · 6 min read
Choosing a machine vision system for visual inspection on the line
Backlight, ring, coaxial or dome for the defect you need to see, why a badly lit frame cannot be fixed later, and vendor questions about the second year.
Summary
This post walks through choosing a machine vision system for a bottling line, starting with the light for each of three inspection questions and only then reaching the model. It argues that a badly lit frame cannot be rescued in software, that rules still win where a silhouette is enough, and that the questions to ask a vendor are about what happens in the second year, including a replaced camera. It is for quality and engineering leads specifying their first system.
Stephen Biswas · Engineer · Sep 23, 2026

Bottling line with bottles queued under the fill head and one missing a cap, generated scene with detections from our model
The bottling line at 6 am runs at a pace where a person can watch the bottles go by and see nothing wrong with any of them. The quality lead wants three things checked on every bottle: the fill is at the line, the cap is on and seated, and the label is straight and unscuffed. Somebody has proposed a camera and a model. Somebody else has proposed a rules-based system from a vendor catalogue. Both are half right, and the half they share is the part nobody has budgeted for, which is the light.
Each of the three questions wants a different light
Fill level is a silhouette question. A backlight behind the bottle, an LED panel the size of a hand, turns the liquid into a dark column against a bright panel, and the line where the column stops is visible from across the room. No front lighting does this as well, because the front of a wet glass bottle is a reflection of the room.
Cap presence and seating is a shape question on a small, often glossy object. A ring light around the lens lights the cap evenly from all sides, and a cap that is tilted casts a shadow the flat one does not. The label is the hard one. It is curved, often glossy, and the defects are scuffs and creases that show as changes in reflection. A dome light, a hemisphere of diffuse light over the bottle, takes the reflections out so the print and the scuffs are what is left. For a flat foil seal on a jar line, a coaxial light, sent down the lens axis through a beam splitter, does the same job on a flat surface.
Dome lights are sold under names like cloudy day illuminator, which is an accurate description of what they do to a shiny surface.
A vision inspection system starts with the light
A vision inspection system is a light, a lens, a sensor and a decision, in that order of importance. The light decides what the defect looks like. The lens decides how many pixels the defect occupies. The sensor decides how much noise sits under those pixels. Only then does the decision, a rule or a model, get to look at the result. On the capper at 6 am that order is the difference between a system that sees a tilted cap and one that sees glare.
My view is that the lighting budget should equal the lens budget, and that both should be settled before anyone talks about models. The what vision can see lesson asks the optics question first: can the camera resolve the thing at all. A cap tilt of a millimetre on a bottle two metres from the lens is a pixel or two, and no model finds a defect that is one pixel wide.
A badly lit frame cannot be fixed in software
A scuff on a label under a bare LED strip is a bright streak on one bottle and invisible on the next, depending on where the bottle stopped. A model trained on those frames learns that scuffs are streaks that appear in one position, which is a fact about the light rather than the label. When the strip is replaced with a dome, the model's evidence for scuffs disappears with the streaks.
Nothing downstream recovers information the frame never carried. A person who has spent a month labeling under bad light has labeled the light. So the imaging is fixed first, with an enclosure that keeps the hall's skylight and the forklift headlights out of the frame, and the labeling starts after the enclosure is closed.
The enclosure is also what stops the imaging changing at 4 pm when the sun reaches the west wall.
Rules win for the fill line, models for the rest
With a backlight in place, the fill level is a bright and dark edge along a known vertical. A hand-written rule, find the edge, compare it with the line, is exact, needs no training, and fails loudly when the backlight dies. Keep it. The same is true of a barcode read.
The cap and the label are where rules stop working, because a scuff has no fixed shape and a tilted cap looks different on every bottle. Those are learned models, and the question then is where the labels come from and who checks them. In LexAnnotate you type "cap and label scuff", Lexi puts a box on every frame, and a person checks each label before anything trains on it. On the manufacturing lines we run, the figure that holds is 99%+ accuracy maintained in production, and it is maintained by the person checking rather than by the model alone.
The questions for a vendor are about the second year
The first year of a vision inspection system is the demonstration. The second year is when the second product runs on the line, a supplier changes the cap moulding, the quality standard for scuffs tightens, and a camera fails. The questions worth asking are about that year.
Who owns the model and the labels, and can they leave with you as a dataset and a model file. What happens when the scuff standard tightens: is that a re-label and a retrain, or a support ticket. How does the model reach the line, on a runner beside the recorder, on your own servers, or in a cloud you do not control. When the model is unsure about a bottle, where does that frame go, and who decides.
LexData takes the bottle model through its whole life. You type what to look for, Lexi puts a box on every frame, and a person checks each label before anything trains on it. The model then watches the cameras on the line, in the cloud, on your servers, or on a runner beside the recorder. Frames it is unsure of come back to a person, the corrections retrain it, and the new version replaces the old one with no downtime. A vendor who cannot describe that loop in their own words is selling the first year.
A replaced camera is the change the vendor never mentions
The camera over the capper fails on a Saturday and the maintenance crew fits the spare, which is a newer unit with a different sensor. The bracket, the view and the light are unchanged. To the operator the picture looks better. To the model the colour balance, the noise and the edge sharpness all moved at once, and the cap model that was steady on Friday is doubtful on Monday.
The drift catalog calls this a camera was replaced, and it reads as an abrupt step on one camera on the day it was serviced, while the fill rule beside it, which cares only about a silhouette, never notices. The fix is a short window of frames from the new sensor, labeled and folded in, and if the plant is replacing cameras in phases, the first unit done properly carries the rest.
A vendor whose answer to that Saturday is a site visit has told you what the second year costs.
See it on your own footage.
Start with your footageMore in Industries

Industries · 8 min read
Computer vision for construction site safety, a warning before the worker and the excavator meet
A pole camera boxes people and machines, draws a danger zone that moves with the excavator, and sends the frame when someone walks into it.
Ayman Quadir · Sep 23, 2026

Industries · 7 min read
Computer vision in agriculture, from the sprayer boom to the packing line
Weeds against beet rows at dawn, lesions on a leaf, bruises on a packhouse belt, and labels that go stale as the season turns.
Ayman Quadir · Sep 23, 2026

Industries · 6 min read
Computer vision applications on a factory floor, four jobs for the cameras already there
Defect detection, assembly verification, safety and inventory on one plant's cameras, with cosmetic against functional written into the labeling schema.
Ayman Quadir · Sep 23, 2026