2 min read · Machine vision

Barcodes and 2D codes encode data in a defined format, while OCR reads characters that appear on the part. The choice depends on whether the manufacturer can define the code or is reading what already exists, along with the print area, the surface and the reading distance.
How to start
Plan two separate steps: reading the data successfully, and checking that the data matches what it should be, such as the lot or model in the production order. Try blurred, missing and reprinted codes, and codes that can be read but belong to a different model.
Steps and checklist
- Separate 1D codes, 2D codes and text read by OCR.
- Survey the data to be held, the available area and the print format.
- Assess the surface, damage, distance and movement.
- Separate a successful decode from data that is correct against the production order.
- Define the source of the expected value and the conditions for rejection.
- Try missing, blurred and duplicate codes with simulated data.
Example
Hypothetical example: a code that can be read but carries the wrong lot code must still be treated as a fail under the job criteria.
Check the result and what to review
A successful read is not the same as passing a print quality assessment under a standard. If the job needs grading, check the standard and the relevant instruments. Do not conclude from the decode result of a general-purpose camera alone.
Benefits
It helps you plan both the reading and the data verification, not just whether the code reads.
Limits and cautions
- A pass on reading is not the same as print quality passing a standard.
- Grading must refer to a standard and suitable instruments.




