Machine vision for food packaging inspection. What it actually inspects, at what speed.
Rules versus deep learning, line speeds on real canning and bottling lines, the four inspections that earn their keep, and the integration handshake with the PLC that decides whether a bad product ever reaches the case.
The four inspections that earn their keep.
How many of the visual defects that reached your last customer complaint could have been caught at the line?
Most of the value of a vision system on a food packaging line comes from four inspections that consistent operator attention cannot deliver at speed.
Label presence and position.
Is there a label, is it the right label for this SKU, and is it inside the position tolerance for that pack format? Three checks, often run by one camera. Misaligned labels are the most common cause of secondary-packaging reject downstream. A label that is 6 mm off centre still reads visually to an operator and still fails the case packer's vision check two metres later. Catch it at the labeller, not the case packer.
Fill level.
The bottle or can has the expected fill volume. On clear containers a vertical-line-position check against a backlight works at speed. On opaque containers the inspection is either weight-based (a checkweigher rather than a vision system) or X-ray. The threshold is set by the legal-for-trade tolerance and the customer specification, in that order, never the other way.
Date code and batch code legibility.
The date code is present, formatted correctly, and legible. OCV (optical character verification) reads the printed string and compares it against the expected pattern for the current run. Smudged, missing, or wrong-format date codes are an inspection target Australian regulators check directly during plant audits, and a date-code reject downstream of vision is preferable to a recall upstream of nothing.
Seal integrity.
The closure is present, correctly oriented, and sealed. For canning lines, this is typically a top-down inspection looking for missing closures, dented rims, or misaligned tabs. For pouches and flexible packs, leak-detection is usually a downstream test rather than a vision check, but a presence check at the seal station catches the bulk of obvious failures.
Other inspections turn up in specific products. Pouch fill levels through translucent film. Blister-pack pellet counts. Tray fill-pattern checks on ready meals. Bottle cap colour against SKU. The four above cover the floor of what a working line should run.
Rules versus deep learning.
Pac Technologies' programming team has a stated position on this question already, on the vision service page: "We use deep learning where rules genuinely fall short — surface defects, complex cosmetic checks. For dimensional and OCR work, rules are still faster, cheaper, and more explainable." The position is unchanged in 2026.
Where rules-based vision wins.
Dimensional checks, fill-level lines on clear containers, OCV on stable fonts, barcode and 2D-code reading, presence-absence checks against clean backgrounds, and label-position checks where the fiducials are reliable. These inspections can be specified in advance, validated against known good and known bad samples, and re-validated mechanically when the line is recommissioned. The decision logic is auditable. A QA manager can read the rule and understand what is being measured.
Where deep learning earns its keep.
Surface-defect detection on natural variation: produce skin on stone fruit, fillet skin on chicken or fish, surface scuffs on extruded products, foreign-object detection on muesli or trail mix. These defect classes are genuinely hard to specify in rules: the variation in the "good" examples is wider than the variation in the "bad" examples, and the boundary moves with the product mix. A trained model with a curated dataset outperforms a rules engine here. The cost is the curated dataset and the retraining discipline when the product mix shifts.
The wrong question.
"Should we use AI vision?" is the wrong framing because most food lines need both technologies for different inspections. The right framing is "which inspections on this line are deep-learning candidates, which are rules candidates, and which are not actually vision candidates at all." Vendors that pitch a unified deep-learning answer are selling complexity. Vendors that pitch rules for every inspection are usually missing surface-defect classes the customer was about to ask for.
Line speed reality.
Beverage canning lines in the Australian market run from about 60 cans per minute at the slowest craft end to about 2,400 at the fastest commercial end. High-speed beer and soft-drink lines sit in the 1,200-2,000 cpm band; juice and dairy filler lines typically run lower. Modern industrial vision systems handle 2,400 cpm comfortably for well-defined inspections, with about 25 milliseconds per container available for image capture, processing, and result publication.
The constraint is rarely the camera itself. Three other things tend to set the practical ceiling.
Lighting.
Strobed LED lighting is the only realistic option at high speed. Continuous lighting requires faster shutter speeds, which need brighter light, which produces heat and glare. Strobe duration of 50-200 microseconds, triggered to the encoder, freezes the container without motion blur. The lighting design is usually 80% of the vision-engineering effort on a high-speed line, and it is where a project most often stalls.
Trigger repeatability.
The vision system has to know exactly when the container is in front of the camera. An encoder-driven trigger from the line drive is the only reliable approach at high speed. Photoeye-based triggers work fine at 600 cpm and start dropping containers above 1,500 cpm. A line that intermittently misses inspections at high speed usually has a trigger problem, not a camera problem.
Reject mechanism.
A 25 ms vision decision is meaningless if the reject mechanism cannot act in time. The PLC has to track the rejected container from the inspection point to the reject point using encoder counts, then fire the reject (air blast, pusher, flap) within a tight window. Plants that add vision without re-sizing the reject mechanism end up rejecting the wrong container at high speed. The integration test that catches this is a deliberate "bad sample inserted" run with the encoder count verified end to end.
The vision-to-PLC handshake.
The vision system makes the decision. The PLC executes the reject. Everything between those two sentences is the integration that decides whether the system works.
The two-layer handshake that consistently works at speed:
- Vision publishes a pass/fail result, indexed to a container ID. Either a digital output line, an EtherNet/IP tag, or a PROFINET tag, depending on the controller platform. The container ID is typically the encoder count at the moment of inspection.
- PLC maintains a tracking register that holds the pass/fail bit against each container as it moves down the line. When the encoder count for that container reaches the reject point, the PLC fires the reject if the bit is set.
The two failure modes that turn up:
- Vision result arriving on the wrong scan. The PLC scan rate (typically 5-20 ms on a ControlLogix or S7-1500) defines when results are read. A vision system that publishes a result the PLC sees on the scan after the container has passed the indexing point is publishing late. The fix is either a dedicated input task at the PLC, a hardware-triggered input on the vision system, or a slower line.
- Encoder slip. An encoder with a worn coupling produces counts that drift relative to the actual container position. The first symptom is intermittent reject of the container behind the bad one. The fix is mechanical.
A vision system with no handshake to the PLC is a vision system that produces a log of defects, not a system that prevents defects from leaving the line. Useful for QA reporting. Worth a small fraction of the value of an integrated system.
Cognex and Keyence — the practitioner shortlist.
The Australian market for industrial vision is functionally a two-vendor decision in 2026: Cognex and Keyence. Both have credible product lines, AU support presence, and partner integrator networks. Pac Technologies has delivered on both. The deeper comparison gets its own spoke in the cluster plan; the short version below is for plants triaging the platform decision now.
Cognex.
Strong on deep-learning capability through the ViDi product line (now embedded in the In-Sight series). Strong on scripting depth via DataMan (barcode, OCR/OCV) and In-Sight (general-purpose vision). Strong on multi-camera coordination through VisionPro for line-level vision systems. The learning curve is steeper than Keyence's, but the ceiling is higher for plants that need complex inspections or integrated AI.
Keyence.
Strong on ease-of-setup and integrated lighting on the CV-X and IV3 families. The application engineer presence in Australia is strong: a Keyence FAE will visit, do a sample inspection on-site, and demonstrate the result the same week. Software learning curve is lower than Cognex's. The AI capability has caught up significantly since 2022, though Cognex still leads at the deep end.
The decision rule that works.
Plants whose engineering team already runs Keyence stay on Keyence. Plants whose engineering team already runs Cognex stay on Cognex. Plants without an installed base usually default to Keyence on first-platform decisions because the support model gets a new team productive faster. The crossover product cases (a plant with one Cognex line and one Keyence line, both running well) are rare and usually reflect specific application requirements rather than indecision.
What to ask before specifying.
Six questions decide whether a vision project lands cleanly or stalls.
- What is the worst-light condition the inspection has to work in? Plant lighting changes with shift, sun angle, and cleaning schedules. The vision system has to handle the worst case, not the typical case.
- What is the variation in the "good" sample? If good products vary more than bad products, rules engineering will fail. Deep learning may help. Better product specification may help more.
- What is the cost of a false reject versus a false accept? Most food customers tolerate false rejects (a small amount of giveaway). Few tolerate false accepts (a bad product reaching the customer). The vision tuning follows the asymmetry.
- Who maintains the system after go-live? Vision systems drift. Lighting ages, cameras shift, the product mix changes. A vision system without a maintenance owner regresses within twelve months.
- What is the PLC platform and the reject mechanism? The vision specification is incomplete without the handshake design.
- What is the validation plan? How will the customer prove the system works on a sample set of known good and known bad before commissioning sign-off?
Plants that answer these six before approaching a vendor get a focused quote. Plants that do not get a quote that hedges every variable and a project that does the same.
Common questions.
Rules-based vision or deep learning, which should we use?
Rules-based vision is faster, cheaper, and more explainable. It is the right answer for dimensional checks, fill-level verification, OCR/OCV on a stable font, barcode reading, and presence-absence checks against a clean background. Deep learning earns its keep when the defects are visual, varied, and hard to specify in advance — surface defects on natural products like fruit or fillets, complex cosmetic checks, and label-skew classes that a rules engine cannot define cleanly. Most food lines need both, on different inspections.
How fast can vision actually inspect a canning line?
High-speed canning lines run up to 2,400 cans per minute. That gives the vision system roughly 25 milliseconds per container, including image capture, processing, and the result going back to the PLC. Modern industrial vision systems with strobed LED lighting and edge inference handle this comfortably for well-defined inspections. The constraint is rarely the camera. It is the lighting, the trigger repeatability, and the reject mechanism downstream.
Cognex or Keyence, which do you prefer?
Both are credible. Pac Technologies has delivered on both. Keyence tends to win on ease-of-setup, support responsiveness in Australia, and integrated lighting on the CV-X family. Cognex tends to win on deep-learning capability (ViDi, now embedded in In-Sight), on scripting depth via DataMan and In-Sight, and on multi-camera coordination. The decision is usually about which family the local engineering team has invested in over the last five years, not about which is technically better.
How does vision tell the PLC to reject a bad product?
The vision system makes a pass/fail decision in real time and asserts a digital output or an EtherNet/IP / PROFINET tag that the PLC reads. The PLC handles the reject mechanism — an air blast, a pusher, a flap diverter — with deterministic timing tied to a downstream encoder count or photoeye. The handshake matters: a vision system that publishes a result the PLC reads on a different scan can miss the reject window. The integration test that catches this is a deliberate 'bad sample inserted' run with the encoder count verified end to end.
Sources and further reading.
Vendor and industry references for the line-speed and platform claims above. Retrieved 18 May 2026.
- FILTEC. Vision Empty Can Inspection. filtec.com
- Keyence. Can Inspection in Food and Beverage Packaging. keyence.com
- Overview.ai. AI Vision for High-Speed Beverage Can & Bottle Inspection. overview.ai
- Cognex. In-Sight Deep Learning. cognex.com
This article sits under the Food & Beverage Automation guide. For the dairy-specific trace story that often runs alongside a vision project, see the dairy MES article. For the integration patterns that put vision data into OEE reporting, see the OEE & SCADA article.
Related reading.
F&B automation guide →F&B automation guide
The full guide. Drivers, sub-sector breakdown, standards stack, and the integrator selection conversation.
Read the guide 02Industrial vision services
Vision system design and integration on Cognex and Keyence platforms. Practitioner-led from the first lighting trial.
Service detail → 03Dairy plant MES traceability
Silo to pallet, in an Australian dairy plant. Standards, platforms, and the recall simulation most plants skip.
Read the article