Machine vision seals beer-barrel integrity

July 1, 2006
Off-the-shelf lighting, automation, and machine-vision components check the integrity of beer-barrel seals.

Off-the-shelf lighting, automation, and machine-vision components check the integrity of beer-barrel seals.

By Andrew Wilson, Editor, and Sarah Sookman

At the St. James Gate brewing plant of Guinness, the company’s draught beer is brewed and kegs are filled for domestic, European, and international customers. To fill, check, and ship these kegs at a rate of approximately 1000 kegs/hour, Guinness has fully automated the plant. Recycled kegs are placed on an automated conveyor system, where they go through several operations before they can be reshipped to the company’s distributors. After the kegs are washed, rinsed, and sterilized, they are filled with beer through a one-way valve at the top of the keg, known as a spear. To determine whether each keg is properly filled, the kegs are weighed and the seals checked for any leaks before they are finally packaged and shipped from the brewery.

To automate the process of inspecting the kegs for leakage, Guinness called on Machine Vision Direct (MVD). Established in 2003, MVD is both a system integrator and a distributor of products from companies such as Basler, Matrox, and Sony. Initially founded by Donal Harrington and Al Goodwin, the company now employs 10 people at its Dublin, Cork, and Louth offices and has developed vision systems for the beverage, pharmaceutical, and electronics industries.

Keg inspection

“Since many different kegs and spears are used by breweries around the world,” says MVD’s Harrington, “the system needed to be adaptable and easily retrofitted to existing high-speed production lines.” At the Guinness facility in Dublin, for example, the system was required to straddle an existing keg-handling system from KHS Till (see Fig. 1).

FIGURE 1. Guinness called on Machine Vision Direct to build a machine-vision system to inspect beer kegs for leakage.
Click here to enlarge image

“After being filled and weighed,” says Harrington, “any improperly filled kegs are rejected from the conveyor, automatically inverted, and emptied. While the beer is recycled, the kegs are returned to a station for refilling and the process repeated. Properly filled kegs travel along the conveyor and into an IP65-certified stainless-steel enclosure that houses the machine-vision system.

As kegs move into the inspection station, their presence is detected by an EQ-500 adjustable-range reflective photoelectric sensor from Panasonic Electric Works. “Using the EQ-500’s two-segment photodiode adjustable-range system, the sensor will not detect objects outside the preset sensing field and is not affected by variations in the object’s angle or gloss compared to conventional sensors,” says Harrington. Output from the sensor triggers image capture with a Matrox 4SightII stand-alone vision system equipped with a Meteor II multichannel frame grabber and a PCM 7230+ isolated digital I/O card from Amplicon.

To capture images of the top of the kegs, MVD used a 1/3-in. progressive-scan, 30-frame/s 1024 × 768 XC-HR-70 monochrome camera from Sony. Fitted with a 25-mm C-mount lens from Pentax Imaging, the camera is mounted on a Robo Cylinder from Intelligent Actuator. “This linear actuator allows the CPU of the 4Sight II machine-vision system to control the position, speed, acceleration, deceleration, and torque of the camera gantry so that different types of beer kegs can be properly focused and imaged,” Harrington says. This gantry is interfaced to a Panasonic PLC that is also controlled using the digital I/O card embedded in the 4SightII (see Fig. 2).

FIGURE 2. To capture images of the top of beer kegs, MVD used a monochrome camera mounted on a linear actuator that allows the system’s host CPU to control the position, speed, acceleration, deceleration, and torque of the camera gantry.
Click here to enlarge image

null

Bubbling up

Surprisingly, Harrington learned that no two beers reflect light the same way. “We’ve discovered different beers exhibit different gray-scale profiles when illuminated with high-intensity solid-state illumination. Even lagers and light ales, which to the naked eye appear quite similar, absorb light quite differently,” he says. “They also fob differently, which means they foam differently on the beer’s surface. And cider, for example, does not fob like beer at all. After filling, cider produces microbubbles. These tiny bubbles can appear in any one of a number of places on the surface of the spear.”

To properly image these microbubbles requires the correct lighting. “We experimented with 620-nm red LED ringlights,” says Harrington, “and found that a low-angle ringlight is the best choice to illuminate highly reflective surfaces such as beer kegs.” Because of this, Harrington chose to equip the camera system with a low-angle LED ringlight from Moritex. “This light is ideal for illuminating slightly uneven, scratched surfaces and provides 360° illumination for reflective objects. The low-angle design prevents spurious image reflection into the camera,” he says.

“The small form factor of the 4Sight-II allowed the system to be integrated within the IP65 enclosure,” recalls Harrington. “This permitted us to visualize any failed kegs on a 15-in.VGA touchscreen monitor interfaced to the 4Sight system and located outside the housing. Without the 4Sight-II we would have had to install the system 30 m away in the production control room. This would have created additional complications for integration and testing and increased the amount of downtime during commissioning,” he says.

Image inspection

After images are captured, they must be processed to inspect whether any leakage is occurring. “In the past, template-matching, based on normalized gray-scale correlation (NGC), was used to correlate a captured image with a known good image or template. However, although NGC algorithms do not tolerate variances in size, rotation, and parts that are not uniformly lit, geometric pattern-matching algorithms can find complex patterns at orientations from 0° to 360° very rapidly. “On beer kegs, where illumination may change and there are highlights and shadows, geometric-based techniques will still find the pattern to be recognized,” he says. Such algorithms can be used with NGC pattern-matching techniques to determine whether a specific keg is leaking.

To decide whether any major leaking is occurring, the system uses an edge-based detection algorithm to determine the edges of the keg. Once this is determined, NGC computes whether specific features exist in the image. “Should major leaking occur, these specific features will be occluded, and the system can recognize that the keg should be rejected,” Harrington says.

FIGURE 3. In cases where microbubbles are present, edge detection is used to locate the perimeter of the keg. NGC techniques then determine whether there is any leakage in the center well of the keg.
Click here to enlarge image

For other kegs, filled with cider, for example, the imaging task is more subtle. “In cases where microbubbles are present,” says Harrington, edge detection is first used to locate the perimeter of the keg. NGC techniques then determine whether there is any leakage in the center well of the keg. However, microbubbles may still appear in the outside rim of the keg spear (see Fig. 3). To detect whether this is occurring, edge-detection algorithms determine the rims of the kegs and the areas of possible leakage. These circumferal areas are then unwarped using MIL and blob analysis used to determine the level of leakage of each of the kegs.

Human interfaces

After each keg is inspected, the pass/fail decision made by the 4SightII is used to control the Panasonic PLC, which actuates a shunt mechanism to send failed kegs to a decanting station. These kegs are emptied, the beer recycled, and the keg sent for repair. To control the number of false rejects, the system’s operator can program the level of acceptability of different keg types using the system’s human-machine interface (HMI) that is displayed on the flat-panel display (see Fig. 4).

FIGURE 4. To control the number of false rejects, a system operator can program the level of acceptability of different keg types using the system’s human-machine interface shown on the flat-panel display.
Click here to enlarge image

Written in Visual C++, the HMI runs on top of MIL to allow the user to set up each production run and monitor the hourly failure rate. “Collected data include the date, time, and quantity of kegs that have failed. Because this information is stored as a text file, it can be rapidly exported to an Excel spreadsheet for real-time or later analysis,” says Harrington.

Sarah Sookman is media relations specialist at Matrox Imaging, Dorval, QC, Canada; www.matrox.com/imaging.

Click here to enlarge image

null

Voice Your Opinion

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