Machine Vision for Packaging: Inspection Tasks and Limits
What machine vision can check on a packaging line, what each task needs in samples, lighting and rejects, and where it cannot replace other tests.
Machine vision can check features that are visible to a camera, such as presence, label position, printed codes and the appearance of a seal area. It needs defined defects, representative samples and confirmed rejects, and it does not replace seal-integrity testing, metal detection or weight checks.
Applies to: Covers camera-based inspection stations on packaging lines for tasks such as presence, label position, code reading and appearance. It does not cover specific camera selection, software configuration or validation for regulated products.
A camera on a packaging line looks simple: it takes a picture and says pass or fail. In practice, the result depends on what the camera can see, how the product is lit and presented, how a defect has been defined, and what happens to a rejected pack. Buyers who treat vision as a general-purpose inspector are often surprised by what it misses and by how much setup it needs.
Below, a vision station is broken into its parts, common packaging inspection tasks are listed with what each one needs, and the limits are stated. The last sections cover documents to request and checks to run on your own product.
How a vision station works
A vision station has a few parts that must work together. A trigger sensor tells the system when a product is in position. A camera with a lens captures the image. Lighting shapes the image so features of interest show contrast. A vision controller analyzes the image and gives a result. An encoder can tie position and timing to the conveyor. If the pack fails, a reject device removes it, and a reject confirmation sensor checks that it left the line, usually into a locked reject bin.
The vision controller reports to the machine PLC, often through discrete signals or a network. The roles of those control elements are explained in the PLC, HMI and motion control guide. Camera and sensor characteristics can be compared using standard methods; EMVA 1288 is a standard for characterizing image sensors and cameras for machine vision.
Three things decide whether the station works in production. The first is lighting and contrast. The camera sees light, not the product, and reflective film, curved surfaces and transparent materials change appearance with the lighting angle, so a ring light, back light or dome light is chosen to suit the feature. The second is presentation: product position, orientation and spacing at the camera must be consistent enough for the program to find the product. The third is timing. The image must be captured at a repeatable point, and the reject must be applied to the right pack after the result is known.
Inspection tasks and what each needs
The table lists common tasks. The right-hand columns show what you should expect to provide or agree with the supplier for each. Whether a task is practical on your line depends on the product, the speed and the quality of the sample set.
| Task | What the camera checks | What it needs | Reject handling to confirm |
|---|---|---|---|
| Presence or absence | Whether an item, cap, label, insert or product is there | Good and bad samples; consistent lighting | Which absences stop the line and which reject a pack |
| Label position | Whether a label is present, straight and in the right place | Samples at the edges of acceptable position; defined limits | How a poorly placed label is rejected and how the labeler is notified |
| Date and lot code reading (OCR/OCV) | Whether a printed code is present and readable, and whether it matches the expected text | Print samples, including worst acceptable and unacceptable; expected data source | What happens when the printer and the vision system disagree |
| Barcode reading and grading | Whether a code can be read, and in some systems how well it prints | Sample codes; the symbology and grade method agreed | Rejecting unreadable codes; recording results where needed |
| Seal area appearance | Visible features in the seal area, such as obvious contamination or visible defects | Samples of visible defects; definition of what is visible vs not | Reject path and confirmation; follow-up testing for suspected seal problems |
| Color or foreign-object appearance | Visible color differences or a visible item on the pack | Samples showing allowed variation; defined target and tolerance | Whether a rejected pack is quarantined for review |
Codes and barcodes
For printed codes and barcodes, reading a code is not the same as grading its print quality. Standards such as ISO/IEC 15416 for linear codes and ISO/IEC 15415 for two-dimensional symbols describe print quality evaluation, and GS1 General Specifications give application rules for trade item barcodes. If your customers or retailers specify a grade, state it in the RFQ and ask how the system measures it.
Seal area appearance
A camera can show visible creases in the seal area, product caught in the seal or a misaligned seal. It cannot show whether the seal is sealed through, whether it will resist leaks, or how strong it is. Those properties need other methods. The seal defect investigation guide describes the types of seal defects and how they are investigated, and the standard test methods it draws on include peel and leak tests.
What each task needs before you can rely on it
Whatever the task, five things need to be defined before a vision station can be commissioned.
- A sample library of good and defective packs, collected across the real variation of product, material, print and lot. A library of perfect packs only gives a system that cannot be tested.
- The station design and light choice, with a record of the settings.
- The rated speed and the product spacing at the camera, so the supplier can check exposure and processing time.
- A written defect definition, with images, of what is a defect and what is acceptable variation. Supplier, quality and production are easier to bring into agreement here than at start-up.
- A defined method to remove a rejected pack, to confirm it was removed, and to keep it from being mixed back into the line.
Assumed example. A food packer wants to check that a date code is present and readable on each pouch. The details are invented for illustration and are not measured or market data. Quality collects a sample set that includes clean prints, light prints, smeared prints, missing codes and codes shifted toward the edge. The team labels each sample as accept or reject and adds a short note on why. The vision supplier uses the set to configure the check and shows results against each labeled sample at FAT. Samples where opinions differ are reviewed and the definition is rewritten. The method is the point: defects are defined before tuning, and the same labeled set is reused to retest after any change.
Limits of vision inspection
Vision is useful, and anyone relying on it should hear its limits stated plainly.
A camera checks visible features only. If a defect cannot be seen from the camera’s viewpoint, lighting and resolution, the system cannot detect it, and hidden features such as what is inside an opaque pack are out of reach.
It does not replace seal-integrity testing. A seal can look acceptable and still leak or open, and a seal that looks irregular can be sound, so seal integrity is verified with test methods suited to the package and product.
It does not replace metal detection either. A camera does not find metal contamination inside a product, and metal detection is a separate technology with its own aperture, sensitivity setup and reject logic. The checkweigher vs. metal detector guide explains what each device does.
Nor does it replace weight checks. A picture of a pack does not give its net content. A checkweigher or another suited method verifies weight, and the net quantity rules depend on your market and product.
The system also depends on its sample library, because it detects only what it has been taught or configured to detect. New defect types, new materials and print changes can need re-validation. And results drift with the environment: dirt on the lens, light aging, vibration and changed product appearance can all change them.
Vision is one part of a quality system. Your hazard analysis and quality plan decide whether it is the right control for a hazard, not the vendor.
Information to request from suppliers
- A station description: camera, lens, lighting type, mounting, enclosure and trigger method.
- The tasks the station performs, with the defect definitions the supplier assumed.
- The sample set the supplier used for setup and the one they ask you to provide.
- Lighting and optics settings, kept as a record.
- Software version, backup copy of the program, and how settings are protected from unauthorized change.
- Result data: which pass and fail counts and images are stored, and how they are exported.
- Behavior on camera failure, communication loss and loss of the reject device.
- The reject path: the device, the confirmation sensor, the bin and its lock arrangement.
- Cleaning and calibration procedure and the recommended check frequency.
- What the station does not check, stated in the supplier’s own words.
Checklist for planning a vision task
- The inspection task and its purpose are written down, with the hazard or quality risk it addresses.
- A defect definition with images exists and is agreed by quality, production and the supplier.
- A sample library with good, borderline and defective packs has been collected.
- Rated speed, pack spacing and orientation at the camera are specified.
- Lighting suits the pack surface, including film gloss or transparency.
- Reject method, reject confirmation and locked reject bin are specified.
- Interface signals to the machine and the line are listed in the line interface checklist.
- Settings access and change control are defined.
- A routine check using known good and known bad samples is planned.
- Other controls for seals, metal and weight are identified and not assumed to be covered by vision.
Limits and on-site verification
This guide cannot say whether a given task is feasible. Feasibility depends on your product, packaging material, speed, print method and layout, and the only dependable way to find out is to run your own samples on the intended station.
Plan these checks with real product and materials:
- A run of known good and known bad samples through the station at line speed, with results compared to the labeled set.
- A run with natural variation, such as different lots, different film batches and the changes that occur through a shift.
- Reject tests, confirming that each rejected pack leaves the line and lands in the locked bin.
- Behavior under fault conditions: missing trigger, camera failure and full reject bin.
Run these checks at the factory and on site as part of acceptance; the FAT vs. SAT guide explains how to split them. Reject devices move packs at line speed, and access to the station and the reject path belongs to the machine risk assessment (ISO 12100 gives the general method), with review by qualified personnel. This guide makes no claim about the results any station will achieve.
References
- ISO/IEC 15416:2025 — Automatic identification and data capture techniques — Bar code print quality test specification — Linear symbols — ISO/IEC
- ISO/IEC 15415:2024 — Automatic identification and data capture techniques — Bar code symbol print quality test specification — Two-dimensional symbols — ISO/IEC
- GS1 General Specifications (Release 26.0, January 2026) — GS1
- EMVA Standard 1288 — Standard for Characterization of Image Sensors and Cameras, Release 4.0 (Linear and General modules) — EMVA
- ISO 12100:2010 — Safety of machinery — General principles for design — Risk assessment and risk reduction — ISO
Update history
- : First published.