Machine Vision Verifies Printed Codes At 800 Cans Per Minute
Machine Vision Verifies Printed Codes At 800 Cans Per Minute
A food processor fills an average of 800 cans per minute with a wide range of products such as vegetables, fruit and soup. An important challenge for the company is ensuring that the code printed on the bottom of each can matches the product in the can. A mismatch runs the risk of creating an unhappy customer or, even worse, an allergic reaction. In the past, there were concerns that operators might accidentally set up the printer to generate the wrong code or that the printer used to apply the code on the can might fail to produce a readable code. These concerns have been overcome with the installation of a machine vision system that reads the code on the bottom of the can in just 60 milliseconds, enough time to reject cans with incorrect or unreadable codes. The vision system uses pattern matching to orient the code regardless of its radial position then uses optical character recognition to read the code and match it against the product currently being produced on the line.
Current and upcoming food traceability legislation requires that food processing companies have systems in place to provide a trail of information that follows each food item through the supply chain. To ensure food safety and efficient recalls, manufacturers must be able to identify and locate any item in the food supply chain and quickly trace it back to its source and forward to its destination. To achieve this, many companies are in the process of implementing 2-D barcodes, vision systems, and image-based ID readers in order to ensure the safety of the supply chain. The food processor in this application decided to begin reading the code on the bottom of each can to be sure that it is readable and that it matches the contents of the can. The goals were to prevent mislabeled products from reaching customers, prevent accidental product mixing on the line and prevent shipping of mixed products to customers.
Application challenges
The greatest challenges of the application are the high speed of the line, the fact that the code can be oriented in any radial position on the can as it moves down the line and the varying finish of the cans which can range from dull to bright and can include water marks. The food processor asked Puffin Automation, Eden Prairie, Minnesota, to find a way to print the code, read the code and reject cans with incorrect or unreadable codes. “We had to locate the four-character code in the radial direction, then read it within the 75 milliseconds spacing between parts,” says Darin Berg, Partner with Puffin Automation. “We needed an exceptionally fast camera with the ability to quickly determine the radial position of the code and then provide a near 100% read rate in spite of inevitable distortion of characters and variation in the background.”
Puffin Automation selected an In-Sight® 5600 series vision system from Cognex (www.cognex.com), which is the company’s fastest vision system. In-Sight vision systems use PatMax®, a patented geometric pattern-matching technology for part and feature location. PatMax dramatically improves the ability to find objects despite changes in angle, size and shading by learning an object’s geometry using a set of boundary curves that are not tied to a pixel grid, and then looking for similar shapes in the image without relying on specific gray levels. In-Sight vision systems also offer the OCRMax optical character reading tool. OCRMax segments a string of alphanumeric characters into individual regions that each contains one letter or number. OCRMax achieves high read rates, even when reading distorted, touching and variably spaced characters or characters printed on uneven or reflective surfaces that cause lighting variations and background noise.
Operation of inspection system
The cans come into the inspection station in single file. An inkjet printer prints the code on each can and also prints fiducials around the product code. A photo eye detects each can and sends a signal to the programmable logic controller (PLC) which in turn commands the vision system to acquire an image of the bottom of the can. The PatMax pattern matching algorithm detects the fiducials and uses them to determine the radial orientation of the can.
The OCRMax tool then performs pre-processing to improve contrast and image correction to improve contrast, correct for changing light conditions and filter out background noise in the image. Puffin Automation engineers used the segmentation rules in the OCRMax tool to train the system on the printed font used on the cans. They also used classification and fielding to improve read accuracy based on knowledge of what characters were likely to appear in each digit of the code. Classification is used to specify the probability of a specific digit being certain characters. For example, a digit might be much more likely to be the letter “B” rather than the number “8”. Fielding is used to specify whether each character is allowed to be a letter or a number or either.
Reads code in 60 milliseconds
Within 60 milliseconds, the In-Sight 5600 vision system acquires the image on the bottom of the can, locates the code and performs optical character recognition. The OCRMax tool returns not only the value of each character but also the certainty of each character on a scale from 1 to 100. Puffin Automation engineers configured the software so that if one or more characters does not achieve a 60% score or if any character is incorrect than the code fails. If all four characters pass with a 60% score then the code is verified. The vision system then sends the inspection results to the inspection system PLC.
When a code is not readable, the bad can is tracked using photo eyes for a few can spaces to the servo reject kicker. Each time the first photo eye is triggered a number is added to a buffer in the inspection system PLC and each time the second photo eye is triggered a number is removed from the buffer. Then when the bad can hits the servo reject kicker station, the inspection system PLC activates the servo reject kicker to remove the can. Another photo eye located just after this station checks to make sure that the can was removed.
The user interface displays the number of passes and fails, and displays the image of the last bad code. The operator can easily switch to another screen that displays index, test, and home buttons for the servo reject kicker, along with alarms and error messages. The fully adjustable vision system enclosure can be quickly resized in every axis to run all of the various sized cans. The operator sets the vision system to the correct height based on a scale.
Currently, operators manually enter the can code to be inspected into the inspection system. Future plans will have the can code loaded automatically over the plant network. The PLC connects to the In-Sight vision system using Ethernet and digital IO. Digital IO delivers pass-fail results from the vision system to the PLC because it provides the highest possible speed. Ethernet is used to transfer the can code from the PLC to the camera.
“The food processing industry is putting increasing emphasis on traceability in the supply chain,” concludes Russ Butchart, Partner with Puffin Automation. “Food and beverage manufacturers can use OCR to check that product descriptions and tracking have been printed on the product, that the label matches the product and that the correct characters are printed clearly for customer safety and brand management. The food processor in this application has used OCR to make immediately improvements in productivity, product documentation and supply chain management. The food processor now has two of these systems in operation at their plant and six more are on the way. The systems have demonstrated the ability to consistently identify and reject cans with the wrong code or with an unreadable code. One key to the success of this application was the use of a vision system with the speed and accuracy to handle the requirements of this application, as well as the flexibility to adapt to the plant’s entire production with very fast changeover.”