Barcode and QR Code Inspection
Reads and verifies 1D barcodes and 2D codes in-line, checking presence, position, print quality and the decoded value against the production record.
Solution Overview
Barcode and QR code visual inspection: reads barcodes, QR codes, DataMatrix codes, and similar markings on products and packaging, and determines whether they are present, whether they can be decoded, and whether the content is correct, with print quality problems assessed as needed. The solution consists of three parts: imaging, algorithm, and interlocking; the judgement threshold must be biased according to the asymmetric cost of escapes and false rejections, and is subject to the results of a measured sample trial.
Code reading looks simple, but the reasons it fails on a production line are usually very specific: The code is printed too faintly, contrast is insufficient, it is washed out by reflections, motion blur occurs, or the code stops right at the edge of the field of view. None of these are problems with the decoding algorithm; they are problems with imaging and station position.
The advantage of visual code reading over a dedicated code reader is that it can Complete several tasks at the same time: code reading + content verification + checking the print quality of the code + verifying label presence along the way. For a station that already has a camera, this is a very natural extension.
inspection Content
Items to verify on site for "barcode and QR code visual inspection", listed by common case
Code presence
- Code not printed
- Code obscured
- Code worn
- Missing Label
Successful decoding
- Contrast too low
- Reflection interference
- Motion blur
- Code size too small
Content Verification
- Does not match the work order
- Code Mix-up
- Duplicate code
- Skipped Numbers
Direction and position
- Code orientation deviation too large
- Code outside the field of view
- Position Offset
- Multi-code sequence
Print Quality
- Bar width deviation
- Insufficient quiet zone
- Localized broken line
- Stain coverage
Multi-Code Scenarios
- 1D + 2D Codes Coexist
- Main code + secondary code
- Multi-side code reading
- Carton code and item code association
inspection Method
From trigger and acquisition to result output, how the judgement is produced
- 01 Workpiece-in-Place Trigger
- 02 image acquisition
- 03 Code region positioning
- 04 Decoding
- 05 Content verified against the database / work order
- 06 Result merging
- 07 Output OK / NG
- 08 PLC interlocking
- 09 Release / Rejection
Code reading stability mainly depends on three conditions: Physical Quality of the Code (print contrast, module clarity), Optical conditions (illumination uniformity, lens resolution, mounting angle), Motion conditions (matching exposure time to motion speed). If any of the three falls short, the decode rate drops noticeably.
For high-speed production lines, an external trigger synchronized with the light source can also be used to freeze the image; products with codes on several faces may need multiple cameras or added mirror assemblies. These are all site engineering decisions that must be made in light of the cycle time and the space available.
judgement and Interlocking
How results are judged and passed to the production line
| Code Reading Result | judgement | Interlocking Action |
|---|---|---|
| Decoding succeeded and content verification passed | OK | Release; result can be returned to the host system |
| Decode Failure | NG | Handled as a code reading failure, usually by re-capturing or isolating the part |
| Decoding succeeds but content does not match | NG | Treated as mixed-up code / wrong material, requires manual verification |
| Verification not enabled | Code value output only | Comparison is handled by the host system |
Code reading failures and code reading errors must be counted separately: the former reflects imaging and print quality, the latter reflects material and process problems. The two improve in completely different directions, and counting them together hides the real cause.
If an MES or traceability system is already in place on site, we recommend that the equipment output the code value and the host system perform the content validation, so that changes to the validation rules do not require modifying the inspection equipment.
Related Inspection Objects
View more specific object characteristics, acceptance criteria and optical notes by object
Applicable Industry
Scenarios in These Industries That Already Have Corresponding Inspection Needs
Common Question
Questions most often asked during selection and implementation
Vision Code Reading vs. a Dedicated Code Reader: Which Is Better?
Dedicated code readers are mature, stable and simple to implement for a single code-reading task; the advantage of vision-based code reading is that it can also complete label presence, character recognition, appearance judgement and other tasks at the same time. The choice depends on how many inspection items the station has to handle.
Can low-contrast codes be read?
Yes, contrast can be improved by better illumination (for example adjusting the angle of incidence, or using light of different wavelengths to enhance the difference between the print and the background). If the contrast of the code itself is already below the lower limit for reliable decoding, no algorithm can compensate, and whether to change the printing method must be considered.
What should be done about missed code reads on a high-speed production line?
First determine whether it is underexposure or motion blur: the former is solved by increasing brightness or lengthening the exposure, while the latter requires shortening the exposure together with a strobe light source. It is also necessary to check whether the trigger timing corresponds exactly to the workpiece position.
Can Print Quality Be Evaluated at the Same Time?
Yes, some intuitive print indicators can be assessed alongside code reading (such as bar-width consistency, quiet zone and spots). However, formal barcode quality grading must be carried out according to the relevant standard with dedicated equipment; a vision system is normally used for trend monitoring on the production line and for intercepting obvious defects.
How are the acceptance criteria for this solution defined?
Code reading failures and code reading errors should be counted separately: the former reflects imaging and printing quality, the latter reflects material and process problems. The two require completely different improvements, and counting them together hides the real cause. If the site already has an MES or traceability system, we recommend that the equipment output the code value and the host system perform content validation, so that changes to validation rules do not require modifying the inspection equipment.
What is the inspection method?
The stability of code reading mainly depends on three conditions: the physical quality of the code (print contrast, module clarity), optical conditions (illumination uniformity, lens resolution, mounting angle) and motion conditions (matching of exposure time to motion speed). If any of the three is not met, the decode rate drops noticeably. For high-speed production lines, an external trigger and light source can be used to freeze the image synchronously; for products with codes on multiple surfaces, multiple cameras or an added mirror assembly may be needed. These are on-site engineering decisions that must be made together with cycle time and space.
Which Inspection Objects Is This Solution Applicable To?
View more specific object characteristics, acceptance criteria, and optical considerations by object; this covers 8 common object types, including label presence/absence inspection, instruction manual presence/absence inspection, packaging accessories presence/absence inspection, and PCB component presence/absence inspection.
Can this solution replace manual labor?
What visual inspection replaces is repetitive visual judgement, not manual labor for everything. The typical division of labor is: vision performs part-by-part full inspection and judgement, while people handle re-judgement of borderline samples, changeovers and exceptions, and maintenance of the optics and tooling. How many people are actually involved depends on the degree of automation and the re-judgement strategy.
How do you verify that this solution is feasible?
Please provide actual product samples with codes (including good parts and parts with known code reading failures) plus a description of the code type and content rules; the engineer will assess code reading stability and the optical configuration.
Submit sample testing
Please provide actual product samples with codes (including good parts and parts with known code reading failures) plus a description of the code type and content rules; the engineer will assess code reading stability and the optical configuration.
Submitted successfully
We have received your sample testing request. A solution engineer will contact you within 1 business day via contact you.
Need to assess imaging conditions, defect criteria and cycle time item by item? Go to the Full Requirement Assessment →
Submit Samples to Get a Visual Inspection Solution
Tell us the workpiece, inspection requirements, production line cycle time and your existing PLC / communication method, and our solution engineers will recommend the inspection method, optical configuration and interlocking solution.