Machine vision automates inspection of wine-bottle labels
California wine-maker Kendall-Jackson believes in using automation to increase production while increasing quality at the same time. Its Fulton, CA, USA, winery uses machine vision to inspect empty wine bottles after washout and again after the bottles have been filled and corks inserted. Machine vision even approves the full cases of wine before they head off the dock and to retailers, but it was only recently that the wine maker returned to machine-vision integrator CIVision to build a new vision system to check the labels on the bottles for accuracy.
Kendall-Jackson’s bottling line produces up to 300 bottles per minute. The company needed a vision system that could acquire an image of labels on both sides of the bottles, check them for presence and placement, and do it without using special mechanical systems to orient the bottles or otherwise slow down the inspection line. In response, CIVision developed the 360 Full View system, which uses four Basler Vision Technologies Gigabit Ethernet Scout cameras (SCA640-70GM), a touch-screen user interface, high-output fluorescent light bank (36–90-W VHO bulbs from UV Lighting Company and a 660 VHO ballast from IceCap), a quad-core PC host running the Matrox image-processing library (MIL), and a proprietary tracking module in an aluminum extrusion frame made from modular parts from Paletti USA (see Fig. 1).
Pour the wine
The California wine industry generated 2.7 billion, 750-ml bottles of wine in 2005, making it the world’s fourth-largest wine-producing region behind France, Italy, and Spain. Producing billions of bottles of wine puts pressure on wineries, not only to produce quality products, but to operate efficiently.
Bottles come out of the filling and corking station and are inspected for chips and cracks. The bottles continue down a conveyor to the 360 Full View station. The station is constructed from Paletti aluminum extrusion parts to support the cameras, lights, and touch-screen interface, as well as acrylic walls to minimize the amount of ambient light entering the inspection area and enclosed shelves to support the host-PC and tracking module, power supplies, and wiring harness.
A pair of cameras is mounted at 90º relative to each other on each side of the conveyor, which runs through the middle of the enclosure; each camera has a 120º field of view to guarantee overlap of the acquired images. This placement allows the cameras to simultaneously capture images of the bottle that—when stitched together into one image--includes the entire circumference of the bottle. A bank of eight high-output fluorescent lamps is mounted above the conveyor, shining down on the bottles to minimize the reflections on the vertical sides of the bottles where the labels are located (see Fig. 2)
“We used high-output 660 ballasts with DHO fluorescent bulbs because they generate the most amount of light in the available space, while making it easy for the customer to replace bulbs as needed,” explains Steve White, director of product research and development at CIVision. “We’re also fans of GigE because it extends the distance the camera can be from the host processor compared to Camera Link without the need for repeaters or hubs,” continues White. “The Basler Scout SCA-640-7GM camera also offers 24-V I/O triggers compared to the 5-V industry standard, which makes the signal more noise-immune.”
Using four cameras meant that CIVision could use standard VGA-resolution cameras. The GigE interface allowed the designers to use a standard, off-the-shelf GigE card in the PC host instead of a specialized, more-expensive frame grabber to convert analog images into digital data for processing.
As a bottle enters the inspection area inside the 360 Full View, the bottle breaks a light beam aimed at a Tri-Tronics RSRC-1 photoeye, sending a 24-V trigger signal to the CIVision TM-15 tracking module. This PLC-type device sends a single trigger signal to all four Scout cameras. The cameras acquire a 640 × 480 image and transmit it across the GigE network cable to the host PC. The TM-15 provides for reject tracking and acts as a fail-safe mechanism to prevent accidentally passing any bad product through the system, should a problem arise.
The image is fed into the PC’s memory, which is typically specified at 2 Gbytes. “We use quad-core microprocessors for processing power,” explains CIVision’s White. “This line operates at rates of 250 to 300 bottles per minute, and the system can run up to 600 bottles per minute. It depends on what sort of inspections you’re doing, but to acquire four images times several hundred bottles per minute, stitch them together, and analyze the labels for position and accuracy takes a lot of image-processing power.”
White adds that mechanical stops would have reduced the required processing power, but would have reduced the flexibility of the system. “Not using a mechanical orienter yields big savings, and we can use less-expensive cameras with lower resolution while providing more flexibility,” says Rick Koval, CIVision senior software designer and manager of R&D.
CIVision’s supervisory program CIVCore running on the PC calls the MIL edge-measure algorithm to locate the bottle in the image. To expedite this step, acrylic lightguides, or flat sheets of acrylic, collect the fluorescent light from above and focus it into a bright line that cuts a cross section on the bottle on the conveyor (see Fig. 3). “It provides a good background for us to run the edge tool and find the bottle at any orientation,” Koval explains.
FIGURE 3. Acrylic lightguides capture light from above and direct it in a bright line across the bottle, making it easier for edge-detection algorithms to locate the bottle in each image from the four cameras.
After the bottle is located in each image, a special “unwrapping” algorithm combines the MIL antiwarping algorithm, and special look-up tables (LUTs) with data on the 3-D shape of a particular wine bottle to remove distortion of the label in the images caused by the curved surface of the bottle. The LUTs aid in correcting for position and tilt of the bottle on the conveyor. Once the images are ‘flattened,’ the MIL registration feature locates key features so that a CIVision algorithm can stitch the four images into a single image—referred to as the fifth, or virtual, camera. “It looks like a linescan image, but at a fraction of the price,” says Koval.
Combining the four images into one image is simplified by the physical design of the system, which has rigid and stable supports to maintain the known position of each camera relative to the bottle conveyor. Using this method, the images are essentially registered vertically to each based on the camera placements relative to the bottle.
“The label’s position is verified by its coordinates in the composite image,” explains White. “If the labels are placed at the correct height on the bottle, then their y coordinates in the combined image are the same. Likewise, if the distance between the labels is not equal, then there’s a problem.”
MIL algorithms make the required measurements between labels to verify horizontal placement, as well as the vertical axis, and use pattern-matching to find key features in the label that verify the right label is on the right bottle. “The Matrox Imaging Library C interface provides good low-level interaction with our own front-end software,” says Koval.
Each combined image is displayed on a Planar Systems 17-in. touch screen during inspection, but it’s not necessary to determine if a bottle passes or fails. The virtual camera is extremely helpful, however, in creating new inspection routines or showing an operator what is going wrong if the labels are continually misplaced.
FIGURE 4. CIVision is considering a move toward LED lighting for the 360 Full View system once manufacturers release new models capable of achieving the same light output as a bank of eight DHO fluorescents, or about 750 W.
CIVision is exploring a move from fluorescent lighting to LEDs but is waiting for output powers to increase to wattages close to the fluorescent lights, which generate 95 W from each of the eight bulbs (see Fig. 4). “We run at high speeds, with a short shutter and small aperture, to provide good depth of field so we can keep the bottle’s surface in focus as it turns away from the camera. That means we need a lot of light for accurate measurements,” concludes Koval. CIVision offers the 360 Full View in various enclosure sizes ranging from 3 × 3 to 4 × 6 ft, making the system applicable to other bottling applications, such as pharmaceuticals.
Sarah Sookman is media relations specialist at Matrox Imaging, Dorval, QC, Canada; www.matrox.com/imaging.
Features, advantages, benefits
“CIVision had two general approaches available when designing the bottle-label inspection system: use mechanical means to orient the bottle to a specific position and use fewer cameras, or forget the mechanical PLC assist and use more cameras,” says Rick Koval, CIVision senior software designer and manager of R&D.
Koval says his designers chose to use four cameras to give the system more flexibility for inspecting a wide variety of bottles with different label sizes and positions and because it allowed them to use the Matrox Imaging Library (MIL) algorithms to create a unique fifth, virtual camera. This virtual camera greatly simplifies setup and changeover while making the display more intuitive to the operator.