• Call Cognex Sales: 855-4-COGNEX (855-426-4639)

  • Contact Us
Cognex Product Applications banner

Customer Stories

When Mistakes Are Not an Option: Procedural Reliability in Pharmaceutical Production

Cognex In-Sight vision system and VisionPro software high speed pharmaceutical label inspection

Related Products

2D Machine Vision Systems Insight 7000 and hand holding In-Sight 9000

In-Sight Vision Systems

Easy to use, industrial-grade smart cameras with advanced machine vision technology.

370 barcode reader held by hand

Fixed-mount Barcode Readers

Vision-enabled barcode readers with the ease-of-use and cost of laser scanners

The worst thing that can happen on a pharmaceutical production line is a mix-up, i.e. either the product or the ID code is not what it should be. Machine vision systems are able to ensure that this type of failure never happens by reliably performing quality control tasks and by ensuring product traceability.

The pharmaceutical market is one of the most demanding and sensitive markets for the entire packaging industry because of high quality requirements. Both products and production systems must meet the current local and international directives and standards. Complete product traceability is of particularly high importance. For one pharmaceutical company based in Northern Germany, image processing using Cognex In-Sight® vision systems and VisionPro® software has become an essential part of their efforts to ensure effective quality control, process optimization and product traceability.

Numerous and varied tasks completed reliably

Every image processing task has its quirks and difficulties. Complete system solutions not only have to perform image processing tasks for quality assurance purposes, they have to fulfill different international standards and directives and consider the reliability of computer-supported systems. For example, the system must comply with the regulations of the EMEA (European Agency for the Evaluation of Medicinal Products), the FDA (U.S. Food & Drug Administration) and the EU GMP4 directives. One of the most difficult requirements is that the system solution must be equipped with a user administration and audit system, which can record all changes made to the system in full detail.

When the pharmaceutical company issued a tender for solutions to its image processing requirements, the emphasis was on forming a partnership with a system integrator able to offer a wide range of experience in this field. The system developer Krempien+Petersen Qualitäts-Kontrollsysteme GmbH (K+P) from Hamburg won the contract because of the reliability of their image processing system solutions, wide range of experience in pharmaceutical production environments, and ability to implement projects rapidly. The system developer expertly checks and validates processes to make sure that the process in question can supply a product that meets previously determined specifications and quality requirements.

After the initial contact between the two companies in 2003, the first system installed was an image processing system for checking the fill level of glass ampoules or vials. The positive results produced by this quality control system, as well as the excellent collaboration between the companies, formed the basis for a trusted partnership and opened the way for more image processing projects. Since the initial contract, six additional filling systems have been equipped with PC-based image processing systems based on Cognex VisionPro software and with the compact and independent vision systems from the Cognex In-Sight product family. As an official Cognex PSI (Partner System Integrator), K+P does not use the market-leading hardware and software components of Cognex in isolation, they also benefit from the specialist support from Cognex and the company's vast expertise and experience in the field of image processing.

In the pharmaceutical plant, experience has shown that every new image processing system that is installed uncovers sources of defects and faults that were previously unknown. Company staff were surprised to learn how ineffectively some of their manufacturing processes had been running. Working hand-in-hand, the two partners were able to optimize many of the different process steps on the line. All of those involved have been convinced that 100% quality control by using image processing brings along a substantial range of benefits.

Reliable image processing systems

The vision systems from the In-Sight 5400 family have proven themselves more than capable of the non-stop, three-shift production line operation of the pharmaceutical company. Integrating the vision systems into the production line was easy because of their compact design and integrated Ethernet interface. The In-Sight vision systems can cope with the high throughput rates of the various production lines because of their powerful internal processors and they are able to precisely and repeatedly perform an entire range of inspection tasks on every single ampoule.

The image processing systems perform checks on ampoules of various types and sizes to determine that they have the correct fill level, color code and label, as well as verify that the imprint is positioned correctly. It also verifies the printed ID data, which is present in both human-readable and coded format, to ensure that the information is complete, correct and readable.

The last step—OCV (optical code verification)—is of critical importance because a "read after write" step is always required to ensure 100% text quality. The In-Sight 5410 system verifies the code quality using the powerful Cognex IDMax® vision tool algorithms. These algorithms are based on the geometrically-oriented and patented Cognex PatMax® technology. The reliable operation of IDMax also makes it possible to set tolerances for code distortion and "dirtiness" of labels. Since the codes are read with 100% reliability, full product traceability is ensured.

Feeding the results back to the labeling machine provides the following advantages:
  • It is possible to ensure that the printing process maintains the required quality standards.
  • The read/no read acceptance threshold can be set higher.
  • Maintenance cycles of the writing device can be detected at an early stage.
  • Frictional losses in the overall process can be minimized.

Completely reliable detection of nuances

On one of the production lines, every ampoule is checked for the correct pharmaceutical code, an OCV check of the print quality is performed and the color code is checked. Two In-Sight 5400s are used to check the label print quality and the code while a PC-based color image processing system with VisionPro software is used to check the color code. The contents of every single ampoule are precisely defined by means of colored rings and the system must be able to recognize the colors without any risk of mix-up. If a colored ring is interpreted incorrectly, a "major alarm" is triggered because this represents a possible product mix-up and the production line is stopped. The production line cannot be restarted by the machine operator but must be restarted by an authorized employee. Correct recognition of the color on the ring is of the utmost importance on this line.

This vision task is extremely tricky

The color coding consists of a combination of the three colored rings, each of which comes in seven different color variants. Some of the colors are very similar to each other and the rings are always slightly different. The colored paint of the rings can vary in width and thickness, which causes some rings to have a different visual appearance and changes the viewer's physiological perception of the color. Perception of color can also be affected by the level of transparency of the glass, the content of the ampoules and changes in ambient conditions. The ampoule sterilization process can also alter the color of the colored rings. There are major differences in the way humans and machines differentiate nuances in color. Nevertheless, the system used to check the color coding must reliably provide repeatable results.

The image processing algorithms of the VisionPro software operate extremely sensitively and are able to complete complicated tasks, such as in this example, with extremely high levels of reliability. VisionPro can differentiate colors by using the additive/subtractive color model of RGB/CYMK as well as the advanced HSV (Hue Saturation and Value)/HSB (Hue Saturation and Brightness color model. Using these extremely precise vision algorithms from VisionPro, the company has been able to practically eliminate the occurrence of false errors.


Another benefit of the partnership between the pharmaceutical company and K+P has been that a certain level of system standardization has been achieved by using both image processing hardware and software components from Cognex. This makes maintenance and adjustments easier. For example, staff members at the production plant are able to quickly make adjustments to the programming without outside help since the development environments of both In-Sight Explorer and VisionPro are user-friendly. The platforms also features all of the interfaces necessary for efficient integration into the process control systems of the production lines including remote maintenance, business communication and production documentation.

For more information on Cognex application solutions:

Related Customer Stories

Featured Cognex Products


Join MyCognex


Cognex representatives are available worldwide to support your vision and industrial barcode reading needs.

Contact Us