Key Takeaways
- Optical character recognition (OCR) is a machine vision application that reads alphanumeric characters obtained from an image and turns them into machine-readable information.
- Optical character verification (OCV) determines the quality of characters in an image, looking for defects like smudges, missing components, and scratches.
- While character accuracy is important, string accuracy is the metric that matters most. One incorrect character can make an entire code invalid.
How your ‘99% accurate’ OCR system causes hidden failures
A 99%-character accuracy claim sounds impressive, but string accuracy is the metric that matters. Multiple characters like numbers, letters, or symbols form a string – the code you’re trying to read or verify. In industrial code reading, strings can reach up to 30 characters.
One study found a 0.912-character error rate (CER) when reading glossy food label packaging, meaning about 9% of characters were unreadable. For a 20-character code, that single-digit error rate means nearly 20% of codes are unreadable, exposing operations to risk like additional costs, rework, and incorrect shipments.
That risk grows with scale. The longer your character strings are and the more codes you read with an ineffective solution, the greater the chances are you’ll fail to read a code.
That failure rate isn’t a software or hardware bug, it’s a mathematical certainty, caused by conflating OCR with OCV.
While these two applications are often implemented side-by-side on a pharmaceutical line or a high-speed packaging conveyor, they ask different questions. One asks, “What does this text say?” The other asks, “Is this text correct?”
OCR reads the VIN number on an automotive part.
OCV judges text accuracy and print quality.
What is OCR? (The “Reader”)
Optical Character Recognition (OCR)
OCR answers a single question: What does this say? It converts the unknown text from an image into machine-readable data. You deploy OCR when you need to capture the unique serial number off an automotive piston or the lot code on pharmaceuticals.
What is OCV? (The “Judge”)
Optical Character Verification (OCV)
OCV answers a different question: Is this text accurate? The application checks the quality of the print. It looks for a missing dot, a smear on the ink, or a faded date stamp. You use OCV when you already know what the text should say (e.g., a batch number specific to today’s production run) and you need to ensure the marking method works correctly. While OCR sees data, OCV detects defects.
Speed and Consistency: Where Manual OCR and OCV Operations Fall Short
Case Study: Yuman Wine Group and PanPass Technology
Historically, employees inspected codes for readability and transcribed data manually. However, increasing line speeds and subjective, human analysis can create production issues. Shandong Quingzhou Yuman Wine Group, a prominent liquor manufacturer in northern China, learned this firsthand.
“In the past, if spray codes were distorted or defective, human inspectors could identify these problems,” said Lui Kaiqiang, Vice Minister of Digital Strategy Development at Yunmen, said. “However, with the new production line’s tripled speed, human eyes cannot detect these defects.”
Other challenges Yunmen faced included low-contrast bottles, complex backgrounds, and inconsistent print quality.
Unreadable codes on liquor bottles introduce immense risk and costs. The company found it challenging to trace raw materials, production processes, and supply chain transparency, making it harder to forecast demand. And bottles with unreadable codes need to be reworked or scrapped, so it was just as important to minimize false rejects in order to keep costs down.
“The OCR requirements are strict - no errors or flaws,” Kaiquiang added. “Based on our comprehensive evaluation, the accuracy rate of the Cognex OCR solution was over 99.9%.”
PanPass Technology Co., Ltd., a traceability and anti-counterfeiting company in Beijing, partnered with Cognex to enhance Yunmen’s traceability efforts. PanPass’ product identity solution uses a text-based product identity (PID) code on products and packaging, which is linked to PanPass’ cloud platform for verification and tracking.
PanPass and Yunmen used In-Sight vision systems and Cognex AI to verify PID codes and transmit the data to PanPass’ platform.
“Our customers’ main priority is reliability,” said Zhang Yonghong, Chairman and CEO of PanPass. “Consistent performance and technology innovation are also important. Cognex machine vision technology addresses all these concerns.”
How AI Surpasses Rule-Based, Template-Matching OCR
Traditional machine vision OCR relies on template matching, where a system uses a defined library of characters and rules to recognize and read text. This method excels when a vision system is reading a structured document or label, but relies on ideal image conditions, a rarity in manufacturing settings.
The real-world challenges of OCR in manufacturing environments like curved surfaces, matte finishes, and flawless labels are prohibitively challenging for template matching. There are too many imaging and character variables to reliably read codes.
AI-enabled vision systems solve these challenges using dedicated vision tools that maximize contrast and compensate for codes on curved surfaces.
While AI is a powerful tool, it’s important to get the basics right first, like camera placement, part/product orientation, and lighting.
Conclusion: A Hybrid Approach
When you only run OCR, a perfectly read code can still be illegible. You ship a product with a smeared expiration date. When you only run OCV, you reject parts with correct print quality but wrong content. You stall your line for no reason.
The dual-layer approach is becoming the norm in manufacturing environments where traceability, compliance, and customer trust are on the line.
You don’t have to choose between the two technologies. Using both OCR and OCV ensures code quality, can help you find the root cause of code quality, and guarantees full tracking and traceability.