Machine vision system enables flexible bottle inspection

April 23, 2020
Smart camera-based vision system inspects at speeds of 500 bottles/minute.

Downtime due to product changeovers and recipe changes hits the bottom line for food and beverage manufacturers. Especially since any given product change may require converting many pieces of equipment, including the vision system, potentially halting production for hours, shifts, or even days.

When a leading American packaged food company expanded its bottled syrup line, it contacted EPIC Vision Systems (St. Louis, MO, USA; to develop an accurate label inspection system. The company desired a system capable of 500 bottles/minute for more than 20 different product labels and an ever-expanding product list. To accomplish this required a simple and reliable process for converting between product types.

Technical challenges in label inspection includes code data and artwork verification tasks, as well as the presence of a wide variety of bottle shapes and sizes. Due to the high quantity of variables, the vision system needed to be built for quick and accurate product selection.

The inspection system (Figure 1) features a high-speed pneumatic rejecter, integrated with an automated changeover and recipe management system, a programmable logic controller, and two Cognex In-Sight vision systems—an In-Sight 5400 and In-Sight 1400 micro—running In-Sight Explorer software. While the In-Sight 1400 micro was repurposed from a previous system, the team added the In-Sight 5400 to the other side of the line because of its strong pattern matching capabilities via the PatMax tool and faster processing capabilities.

Both standard 640 x 480 imagers, the Cognex vision systems operate at roughly a 15-inch working distance to accommodate for variability in bottle position and to retain enough depth of field for features to remain in focus. The In-Sight 5400 operates with a field of view of approximately 4 inches by 3 inches and uses high-angle front lighting for illuminating features on the label and barcode, coupled with two S75 brick spots lights from Smart Vision Lights (Norton Shores, MI, USA; mounted off-center and angled toward the field of view, providing bright, high-contrast images. The lights also ensure that direct reflections do not interfere with the camera view angle and the images. The field of view on the In-Sight 1400 was just slightly smaller to focus on label artwork details, which the system inspects to verify label placement (location and angle) as well as recipe match to current product type. This sensor uses a similar high-angle front light approach.

Label verification

In this application, the vision system inspects more than 20 pressure sensitive (adhesive) and sleeve labels. Mounted on either side of the conveyor, the vision sensors inspect the pressure sensitive labels on the fronts and backs of oval-shaped bottles and the sleeve labels placed over the entire body of similar oval bottles to verify that each label is correct and in the right position.

The label verification algorithms use geometric pattern matching to check for correct label graphics and barcode values. The vision system inspects the pressure sensitive labels and verifies the artwork on the front matches the barcode on the back, and measures label position and angle to ensure proper placement. Additionally, the system inspects sleeve labels to verify proper recipe parameters, while barcode location ensures proper sleeve orientation relative to the bottle shape in both the vertical and horizontal axes.

The system also measures label position relative to the bottle to ensure proper placement relative to the client’s +/- 2mm specification, which helps to confirm that the sleeve covers the entire height of the bottle and is not twisted relative to the oval-shaped front and back of the bottle (Figure 2). For cylindrical bottles, it is important to the client that the vision inspection system verifies that sleeve labels did not shrink off the bottom of the bottle or get twisted out of alignment with the shape of the bottle.

After using the barcode to verify recipe type from the features visible in the front light, the barcode location is measured relative to the bottle side and bottom to verify proper label location and placement. The team uses 1D barcode readers and pattern tools to identify rough barcode location, edge detection tools for precise barcode edges and bottle edges, math tools with the Cognex software, and manually calibrated images to convert pixel values and product dimensions in millimeters.

500+ inspections per minute

The machine vision system was built to ensure that every single syrup bottle was verified prior to case packing. A CompactLogix PLC from Allen Bradley (A Rockwell Automation company; Milwaukee, WI, USA; combines the signals from the two Cognex vision systems into a single result.

Reject tracking logic integrated the signals from a Dynapar (Gurnee, IL, USA; Hollowshaft incremental encoder mounted to the conveyor, the product triggers via a photoelectric sensor from SICK (Waldkirch, Germany;, and the camera outputs. This enables the PLC to register the location of each bottle during inspection and follow the bottle down the conveyor belt to the reject station. The system uses failsafe reject logic to ensure that only bottles that have been verified as correct ever make it into the case (Figure 3). Any bottle that either receives a fail result or if the camera provided no result would be rejected after the vision station.

Because the environment is a food line with washdown cleaning procedures, the In-Sight 1400 is housed in an APG (Allison Park, PA, USA; enclosure while the team installed a lens cover on the In-Sight 5400 to ensure IP67 protection during cleaning operations.

PLC and HMI integration for quick conversion

The inspection criteria were driven by recipe parameters for each bottle and label type. To accommodate for the wide variety of labels and bottles, the customer’s line PLC would pass recipe information to an integrated CompactLogix PLC. The encoder also tracks product position to the downstream reject station

During any change of product type, the operations team had a simple two-step procedure to convert the vision system, beginning with the selection of the correct program (.job) file from the In-Sight vision systems’ onboard memory. Second, the operator must adjust or confirm the camera physical adjustments for the package size.

Using the Cognex VisionView HMI, product changeover can be managed in as little as two minutes. From a selection screen on the Cognex VisionView HMI, operators turn the camera offline and using a recipe selection button in the program, select from a list of pre-programmed .job files. Filenames match to the current product label by using the last few digits of the barcode value as part of the recipe file name. After selecting the correct recipe, the operator turns the camera online for inspection, turns a hand dial to the correct number location, and relocks slides to maintain camera and photoeye positions during runtime.

For bottle size changes, the system features a height adjustment for the camera centerline. With predetermined centerline positions, this portion of the conversion was documented and changed by operations to ensure the camera would be imaging the correct region of the bottle for label verification. To develop the height adjustment capability, EPIC uses a combination of rail components from Igus (East Providence, RI, USA; to custom build adjustment slides and mounting parts for the correct necessary range of motion.

All camera and lighting components are built from a custom design mounting using SOLIDWORKS 3D CAD design software from Dassault Systèmes (Vélizy-Villacoublay, France; Modeling the vision design enables the EPIC team to design to customer dimensional and space requirements and to ensure the geometry of imaging components will always be fixed and reliable. 

The system was designed such that the conversion process is simple and repeatable and so that it can run while the operator is moving along the line making changes such as conveyor rail widths and other package size adjustments. The entire vision conversion process requires less than two minutes for most production changes.

For new label types, a supervisor or trained technical operator was required to use a key switch to access the program training functions. The key was tied to I/O that would enable and disable the pattern training within the camera program. Creating new product program types required training the artwork pattern to a unique feature of the front label and training the UPC code on the back label. This task takes no more than a few minutes to train a new pattern and save the program with a file name to match the product UPC.

To receive recipe information, the vision system PLC integrates with the customer’s line PLC and with the In-Sight vision systems via Ethernet. By messaging current product recipe codes from the line PLC, the vision PLC was programmed to verify that the cameras were running the proper inspection programs for the current bottle size and label types.

Hypothetically, the system could utilize automated change parts for mechanical positioning, but this means increased costs for the system design and hardware. Additionally, the PLC messages could fully automate camera program changes, but this adds to programming cost while reducing the flexibility for operations to add new products without adding PLC program code.

Dan Naldony is the Director of Engineering, Machine Vision, EPIC Vision Systems (St Louis, MO;

Related stories:

Vision system verifies part orientation before adhesive application

Automated system inspects radioactive medical imaging product labels

Vision system automatically counts piston rings

Share your vision-related news by contacting Dennis Scimeca, Associate Editor, Vision Systems Design

Voice Your Opinion

To join the conversation, and become an exclusive member of Vision Systems Design, create an account today!