Computer vision in food and beverage production earns its keep on three jobs: verifying fill levels, confirming that the right label is present, straight, and undamaged, and reading date and lot codes at line speed. The techniques are mature, and on a high-speed line the payback is usually measured in months rather than years. The hard parts have less to do with algorithms than with the physics of imaging liquid through packaging and with hardware that survives caustic washdown. Here is what works, where the limits are, and what the environment does to your equipment.
What can computer vision inspect on a food and beverage line?
The dependable applications share one trait: the feature is visible from outside the package. Fill level in clear or translucent containers. Cap and closure inspection, including cocked caps, missing or broken tamper bands, and caps seated high or low. Label presence, position, skew, and damage, plus verification that the label is the correct one for the product being run. Date and lot code presence and legibility. Count and orientation checks in case packing before the case is sealed. Empty-container inspection ahead of the filler, which catches chipped glass finishes, residual rinse water, and foreign objects while there is still a clean line of sight into the open container.
Be equally clear about what vision does not do. Foreign material inside a sealed, opaque container is X-ray or metal-detection territory, not optics. Microbial contamination is invisible at any wavelength a camera can see. Seal integrity on flexible film is only partly visible: a wrinkle crossing the seal area can be imaged, but a channel leak under an intact-looking film usually cannot. An integrator who says these things out loud during scoping is worth more than one who discovers them during commissioning.
Fill level inspection is mostly a backlighting problem
For clear glass or PET, the standard approach is almost boring. Put a diffuse backlight panel behind the container and a camera in front, and the liquid line appears as a sharp silhouette. Find the edge of the meniscus, convert pixels to millimeters, compare against per-SKU limits. Done properly this holds around a millimeter of repeatability at several hundred containers per minute.
The complications are all physics. Carbonated products foam, and foam images as a fuzzy gray gradient instead of a crisp meniscus. The usual fixes are placing the inspection far enough downstream for foam to settle, or moving to near-infrared light around 850 nm, which penetrates foam and many printed graphics better than visible light does. Amber glass and dyed PET block much of the visible spectrum, but 850 nm passes through many dyes while common CMOS sensors remain sensitive there, so an IR light with a matched bandpass filter often turns an opaque-looking bottle conveniently translucent. Hot-filled products shrink as they cool, so the specification has to state the temperature at which the level applies, or the inspection point and the complaint department will disagree forever. Metal cans defeat optics entirely; fill there gets verified by checkweigher or X-ray, and the camera earns its place on lid presence and seam appearance instead.
Speed is a triggering problem before it is a camera problem. At 600 containers per minute a bottle passes every 100 milliseconds, moving fast enough that a lazy exposure smears the meniscus into uselessness. Each container trips a sensor that fires the camera and a strobed light together, with exposures down in the tens of microseconds. The geometry and strobing details are covered in machine vision lighting basics.
Label and date-code checks that prevent recalls
Detecting that a label exists is trivial. The checks that prevent expensive events go further. The worst labeling failure is not a missing label but the wrong one, because a label that fails to declare an allergen actually present in the product is a recall, not a cosmetic defect. Wrong-label protection means verifying identity, usually by reading the label barcode or matching distinctive printed features against the SKU the line is supposed to be running, interlocked with the production schedule so a leftover roll from the last changeover gets caught on the first container.
Position and skew are measured relative to container features, typically to within a couple of millimeters and a couple of degrees. Wrinkles and flagged edges are topographic defects, so they respond to low-angle lighting rather than head-on illumination. Round containers add a coverage problem: a full-wrap inspection needs three or four cameras spaced around the conveyor, or a mechanism that rotates the container past a single camera.
For date and lot codes, distinguish OCR from OCV. OCR reads whatever is printed and reports it. OCV verifies the print against the string the system already expects from the schedule, which is the right tool here, because the realistic failure mode is a printer drifting out of spec or loaded with yesterday's date. Continuous inkjet printers degrade gradually as nozzles clog, dropping dots from dot-matrix characters, so a good system grades print quality over time and alarms on the trend before the code becomes illegible. That converts an emergency line stop into a scheduled printhead cleaning. If your product ships through large retailers, add barcode grading to ISO/IEC 15416, because poor scan grades turn into chargebacks.
Will the hardware survive washdown?
Sanitation is harder on vision hardware than production is. Daily washdown means hot water, caustic or chlorinated chemistry, and often high pressure, which is exactly the combination electronics hate. The ingress ratings that matter:
- IP65 withstands water jets and suits splash zones away from direct spray
- IP67 adds temporary immersion, but neither rating speaks to hot, high-pressure spray
- IP69K is the washdown spec: close-range water at roughly 80 degrees C and 80 to 100 bar, and it is what direct-spray zones require
Chemical compatibility matters as much as the water rating. Chlorinated and caustic cleaners pit anodized aluminum and slowly cloud polycarbonate windows, so food-zone enclosures should be 316 stainless with chemically resistant glass viewports and EPDM gaskets. Then there is thermal shock, the quiet killer: a hot washdown followed by cooldown contracts the air inside an enclosure, pulling moist plant air past the gaskets, and a week later there is condensation on the inside of the lens and a "failed" camera that never actually failed. The fixes are a genuinely sealed enclosure with desiccant, or better, a positive-pressure purge from clean dry air so the enclosure always leaks outward. Round it out with hygienic details: sloped enclosure tops that shed water, standoff mounting that leaves no harborage gap against the frame, washdown-rated cable glands, and jacketing that tolerates the plant's actual chemicals, because a garden-variety cable fitting is usually the first thing to fail.
What does a food and beverage vision system cost?
Hedged brackets, because scope moves these numbers a lot. A single-point smart camera check such as a date code or cap inspection often lands between $10,000 and $35,000 installed. Fill level with IR lighting and a reject mechanism tends toward $30,000 to $80,000. Full-wrap label inspection with three or four cameras at high line speed commonly runs $60,000 to $180,000. Washdown-rated construction adds roughly 20 to 40 percent over a dry-area equivalent, and high-speed rejection with confirmation sensing adds real money of its own. A fuller breakdown of where the money goes is in what a machine vision system costs.
The payback math is often carried by fill giveaway alone. As a hypothetical: a line running 300 bottles per minute at a 500 ml target, averaging one percent overfill as insurance against underfill complaints, gives away 5 ml per bottle. Over an eight-hour shift that is 144,000 bottles and about 720 liters of free product, every shift. Tightening the fill distribution with real measurement funds the system before counting a single prevented mislabel.
FAQ
Can computer vision detect foreign material in food?
Only when it is visible from outside: contaminants on open product on a belt, objects in an empty container before filling, or color-sortable defects in bulk flow. Inside sealed or opaque packaging the correct tools are X-ray inspection and metal detection, often alongside vision rather than instead of it.
What IP rating does washdown equipment need?
Direct-spray sanitation zones call for IP69K, which covers close-range hot water at high pressure. IP65 or IP67 can be acceptable in splash zones, but check chemical compatibility separately, because ingress ratings say nothing about caustic attack on housings, windows, and gaskets.
Should date codes be checked with OCR or OCV?
Use OCV when the line knows what should be printed, which is almost always: it verifies the code against the expected string and catches wrong dates, dropped characters, and fading print. Plain OCR is for cases where the expected text genuinely is not known to the system in advance.
How fast can a vision system inspect containers?
Several hundred containers per minute is routine, and beverage lines run camera inspection beyond 1,000 per minute with hardware triggering and strobed lighting. The practical limit is usually the reject mechanism and part tracking, not the imaging itself.
Willowark designs vision systems for exactly these environments, from imaging feasibility through washdown-rated deployment, under our vision and sensing services. If you are looking at fill, label, or code inspection on a packaging line, contact us and we can talk through what your product and line speed actually require.
Relevant for Food & Beverage, Manufacturing, Packaging · Vision & Advanced Sensing
Engineering notes, monthly
One article like this a month. No pitch.
What we're building across the digital/physical boundary, what we learned, and one thing you can use. Double opt-in, one-click unsubscribe.

