Book a consultation

Cognex Machine Vision Applications: What Vision Does on a Plant Line

Cognex Label Inspection for Food and Beverage Lines

Cognex label inspection on food and beverage lines: labels, date and lot codes, fill and seal, allergen label checks, washdown limits, reject confirmation.

Vladimir Romanov


Cognex label inspection on a food or beverage line answers a handful of plant questions: is the label on, straight and the right one, is the date and lot code printed and readable, is the product filled and sealed, and was a failed pack really removed. This page covers those checks for the food and beverage industries, what to know about washdown, and how to confirm rejects. It sits under Cognex machine vision applications in the Cognex hub.

Tool names come from Cognex’s own food and beverage guide, which is marketing material, so they are attributed as Cognex statements. The plant-side context is in our post on food and beverage automation. Facts are as of November 2026.

What the checks are

CheckWhat Cognex states it usesWhat can go wrong
Label presence and skewIn-Sight 2D systems, pattern matching to locate the label and check alignmentNew label stock, glare on film, label drift at speed
Label defectsIn-Sight with edge learning tools to classify defectsFew bad examples to train on
Date and lot codesIn-Sight with OCRMax (font-trainable OCR and OCV), or AI-based reading for damaged charactersPrint contrast on recycled or variable material
Fill levelIn-Sight 2D systems measuring liquid volumeFoam, translucent liquids, condensation
Caps and sealsIn-Sight edge tools for cap height and skew, AI tools for seal contamination, 3D laser for boxed bottlesLighting on curved glass, wet surfaces
Allergen label presenceIn-Sight pattern matching for presence and clarityCorrect label on the wrong product
Barcode qualityDataMan readers and verifiers for GS1 gradeGrade depends on the standard’s lighting

Source for the table: Cognex Food and Beverage Solutions Guide for the tools, and our reading for the failure column.

Rows of gold bottle caps on dark glass bottles in soft focus
Caps and closures carry the codes to read and the seals to check, and they are wet, curved and reflective.

Date and lot codes

Reading is not verifying. OCR returns the characters it sees. OCV compares them against what should have been printed and judges legibility. For a date code, the useful check is that the text matches the expected date and lot from the line’s data, not merely that some text exists. A code that reads “perfectly” but carries yesterday’s date is the failure that matters.

Print quality drives the result. Cognex’s guide notes that sustainable or recycled materials vary in appearance within a run, making print contrast hard to hold, and suggests feeding inspection data back to the marking system so it can adjust. That closed loop is a vendor example of a use case, not a feature we have verified on every printer.

Allergen label verification

Cognex’s guide describes In-Sight systems inspecting for the presence of allergen labels and checking that they are clearly printed, and its list of allergens includes peanuts, soybeans, milk, eggs, shellfish, tree nuts and wheat. The allergens that must be declared are set by the regulation of your market, so take that list from your regulatory team, not from a vendor guide.

An illustrative case: a line runs two flavours in the same carton, one containing milk. At changeover someone loads the wrong carton roll. A camera that checks “an allergen panel is present” passes the wrong carton. A camera that reads the product code or printed text and compares it with the recipe the PLC has selected catches it. In our view the second design is the one to specify, and it makes the expected value a controlled piece of data, with the recipe selection protected by the same change control as the check.

Washdown and IP ratings

Food areas are wet. Cognex documentation lists IP67 for several In-Sight systems, in some cases only when the cover, cables or an integrated light are fitted. For example, the In-Sight 3800 is IP67 only with its cables or connector plug fitted and the IP67-rated cover or Multi Torch attachment installed, per its manual. The DM475 verifier manual describes an IP65-rated housing in its overview, and its specification table lists IP67 for the Label Light model and IP65 with cable for the DPM and HD models, so read the table for your variant.

What that does and does not tell you. IP67 is a rating for dust-tight enclosure and temporary immersion under the IEC 60529 ingress protection system. High-pressure, hot-water sanitation is a harsher duty than that, and the Cognex manuals we read state no rating for it. We did not find Cognex washdown-specific guidance for this page, so confirm the rating of the exact model and accessory in its manual and decide with sanitation whether a stainless enclosure is also needed. In our view, also plan for condensation on lenses and windows.

Fill and seal in practice

Fill level is a measurement of where the liquid surface sits in the container, so it depends on a stable view of the container edge and a visible meniscus. Foam, dark or translucent liquids and condensation all move the edge. Backlight often helps with translucent containers, while opaque ones need a different method, so choose lighting by trial on real product (Keyence lighting basics).

Caps and seals. Cognex’s packaging guide describes measuring the distance between the cap top and the bottle neck, and the cap’s horizontal position, against programmable limits, with failed bottles rejected. For film seals it describes AI tools looking for foreign matter and voids, and notes that rule-based tools struggle when particle size and contrast change (Cognex Packaging Guide). That is Cognex’s framing. Both approaches need known-good and known-bad samples to set a limit.

A specification checklist

  1. List the checks in order of consequence, with allergen and date errors first.
  2. State the expected-value source for each (recipe, order, clock) and who can change it.
  3. Set feature size, field of view and speed, and compute pixels per feature and blur as on the applications page.
  4. Choose lighting by trial, and plan for changeover lighting.
  5. Specify the washdown rating of the camera, light and cables as a set.
  6. Design the reject path with a confirm sensor, a fail-run alarm and an override log.
  7. Keep images of fails for audit and later training, with a retention rule.

Reject confirmation

A reject that does not happen is the most expensive failure. The camera says fail, but the gate is late, jams or misses, and the pack ships.

Reject confirmation logic in the PLC The vision result arrives at the PLC. If it is pass, the product continues. If it is fail, the PLC fires the reject gate after a delay computed from distance and belt speed, then waits for the confirm sensor within a time window. If the sensor sees the product, the reject is counted and the line continues. If not, the PLC raises an alarm and stops the line or holds the batch. Vision result pass or fail, with ID Fail? PLC checks result No Product continues Yes Fire gate after delay distance / belt speed Confirm sensor seen within window? Yes Count reject, carry on No Alarm, stop line or hold batch
The rule that closes the loop: no confirm signal inside the window means the reject is treated as failed, not assumed.

Design points. Count consecutive fails and alarm on a run. Log every override with a user. Test the whole chain by placing a known-bad pack and watching the gate and the sensor, not only the camera result. The trigger, result and reject handshake with the PLC is described on the PLC integration page.

Where it gets hard

  • Washdown rating is model- and accessory-specific. A rating that holds with the cover on may not hold with a lens or light changed.
  • The expected value is outside the camera. Allergen and date checks depend on the recipe and date data reaching the camera correctly.
  • Foreign matter. Cognex’s guide shows AI tools inspecting for foreign objects. A camera finds what it can see under set lighting. X-ray and metal detection serve other contaminants. Vision adds to them and does not retire them.
  • Variable products and labels. Natural products and variable films push the application toward the Edge AI tools, whose image counts are vendor claims.
  • Lighting on glass and film. Glare and condensation change the image through the shift.

Related: packaging inspection, pharmaceutical serialization, systems integration.

Frequently asked questions

What does Cognex label inspection check on a food line?

Cognex's food and beverage guide describes In-Sight systems checking label presence and skew, reading alphanumeric date and lot codes with OCRMax, classifying label defects with edge learning, and checking for the presence of allergen labels with pattern matching. Which tool fits depends on how stable the label, print and lighting are.

Can a vision system verify that the allergen statement is correct?

It can check that a label is present, in position and, with character reading, that the printed text matches an expected string. It cannot know the right text by itself. The expected value has to come from the PLC or recipe system, so the check is only as good as that data and the changeover procedure.

Are In-Sight cameras suitable for washdown areas?

Cognex lists IP67 for several In-Sight systems, sometimes only with the cover, cables or light fitted. IP67 covers dust and temporary immersion, not necessarily high-pressure hot washdown. Confirm the rating of the exact model in its manual, and decide with your sanitation team whether a stainless enclosure is also needed.

How do I know a rejected product actually left the line?

Put a confirm sensor at the reject point and have the PLC wait for it within a time window. If the sensor does not see the product, stop the line or hold the batch. Without this check, a gate that misses lets a failed product continue, and the vision result alone proves nothing.

References and further reading

  1. Cognex Food and Beverage Solutions Guide · Cognex (copy hosted by an exhibition organiser)The applications Cognex lists for food and beverage, with the tool families it names.
  2. Cognex Packaging Inspection Applications Guide · Cognex (copy hosted by an exhibition organiser)Seal, cap and allergen label applications.
  3. In-Sight 3800 Reference Manual (Vision Suite 25.3 documentation set) · Cognex documentationIngress protection conditions and protocol support for the 3800.
  4. Machine Vision on Packaging Lines · Association for Advancing Automation (A3)A neutral overview of packaging-line vision tasks.
  5. Basics of lighting selection · Keyence

← Applications

Have a project that needs technical ownership?

Send us the situation. If it is not something we should take on, we will say so.

The Plant-Side Brief

The weekly brief for the people who own a plant’s control systems.

One email every Wednesday for engineering and operations leaders responsible for controls, SCADA, MES and OT networks. Skim the top in two minutes; read the Deep Dive when you have fifteen.

  • One modernization problem, worked through to cost, risk and a schedule you can defend. The Deep Dive.
  • End-of-support dates before they reach your plant Windows, servers, controllers and HMI software. Lifecycle Watch.
  • A checklist your engineers can run that week not a framework to admire. Field Kit.
  • Every number sourced, no vendor agenda we are paid by plants, never by vendors.