Dynamic OCR inspection with HALCON ensures maximum product quality
Medical Supplies & Pharmaceutical | HALCON | Bar Code & Data Code Reading | OCRIn the pharmaceutical industry, strict compliance regulations require medical product packaging to be correctly labeled before delivery. To meet these requirements, the Chinese company Shenzhen Jiangrun Xuneng Technology has developed a powerful machine vision solution that automatically reads and verifies printed character codes using OCR.
At the core of the application is HALCON, the standard machine vision software from MVTec, which enables efficient visual inspection and significantly improves product quality.
Why is automated visual inspection essential in the pharmaceutical industry?
Production processes in the pharmaceutical industry are governed by Good Manufacturing Practice (GMP) guidelines, which demand consistently high quality standards. These regulations impose strict requirements on documentation and the inspection process.
The global healthcare and food company H&H Group is directly affected by these requirements. Packaging for medical and cosmetic products must be clearly and correctly labeled with information such as batch number, manufacturing date, and expiration date. Only accurate and complete labeling ensures traceability, safety, and regulatory compliance, making reliable inspection indispensable before products leave the factory.
What risks arise from manual inspection processes?
At H&H Group, label inspection was previously carried out entirely manually. Due to high production volumes and fast cycle times, checks were often performed only on a random basis. As a result, incorrectly labeled products occasionally reached the market, leading to complaints, financial losses, and reputational damage.
To improve labeling reliability and efficiency, the inspection process needed to be automated. H&H Group therefore commissioned Shenzhen Jiangrun Xuneng Technology, a specialist in machine vision and AI-based software frameworks for industrial applications.

How does machine vision automate the OCR inspection process?
Jiangrun developed a machine vision platform that fully automates the visual inspection of printed labels. Using modern optical character recognition, alphanumeric codes are read and verified automatically.
The application posed several challenges: encrypted codes, varying font sizes, offset printing positions, blurred or poorly printed characters, and high throughput requirements. In addition, the fast cycle time of the production line requires OCR algorithms to operate with both high speed and accuracy, supported by robust image preprocessing.

How does HALCON support precise character recognition?
These complex requirements are addressed using HALCON, which forms the heart of Jiangrun’s machine vision solution. HALCON algorithms handle image pre- and post-processing as well as the precise identification and localization of characters.
The software first detects the background and determines a reference line to locate the characters accurately. A defined region of interest (ROI) is then used to recognize and verify information such as batch numbers or expiration dates. By comparing detected characters with reference data, labeling errors can be reliably identified.
What benefits does dynamic OCR deliver in production?
With HALCON, Jiangrun was able to shorten project timelines, reduce development and operating costs, and improve implementation efficiency. Dynamic OCR runs with high stability and processing speed, while new product types, markings, or fonts can be integrated flexibly.
For the end customer, H&H Group, the automated inspection process eliminates time-consuming manual work, increases efficiency through automation, and ensures consistently high product quality. As a result, complaints are minimized and the brand image is strengthened.
What comes next for machine vision applications?
Following the project’s success, Jiangrun plans to implement additional machine vision software applications based on HALCON. Standardized frameworks enable complex image processing projects to be realized more efficiently across various industries, supported by close technical collaboration and expertise from MVTec.