Pixel-counting sensors detect bottle labels

"Keep it simple" is good design advice for many machine-vision applications, including packaging-inspection installations that may appear to demand a more complicated approach. For example, DPT Laboratories (San Antonio, TX), a company that packages health products, opted for a straightforward vision architecture by adopting a pixel-counting sensor that can inspect containers for the presence or absence of labels.

Th 68566

Arranged in arrays on a production-line conveyor, CMOS-based sensors inspect surfaces of small bottles for the presence of labels.

By Lawrence J. Curran,Contributing Editor

"Keep it simple" is good design advice for many machine-vision applications, including packaging-inspection installations that may appear to demand a more complicated approach. For example, DPT Laboratories (San Antonio, TX), a company that packages health products, opted for a straightforward vision architecture by adopting a pixel-counting sensor that can inspect containers for the presence or absence of labels.

The sensor is called PresencePLUS, and 20 of its CMOS camera-based units have been working successfully at DPT Laboratories for nearly a year. The initial units were installed by developer Banner Engineering Corp. (Minneapolis, MN). The sensors are arranged in an array of 10 on each side of a conveyer to inspect both the front and back surfaces of small bottles for labels (see Fig. 1).

Th 68566
Click here to enlarge image

FIGURE 1. Bottles of suntan lotion are conveyed past the PresencePLUS pixel-counting sensor to check for missing labels. A photoelectric gate or convergent-mode sensor atop the sensor (bottom right) strobes the ringlight and starts the inspection of each bottle when the bottle is centered directly in front of the pixel-counting sensor lens. The pixel-counting sensor rejects bottles with missing labels—a judgment made based on the pixel count the sensor has been taught. Another sensor (top left) inspects the back surface of the bottles. It is triggered by the same photoelectric gate.

DPT Laboratories is an outsourcing company for both prescription and over-the-counter medications and cosmetic products. The company specializes in developing and manufacturing products that include creams, lotions, gels, and liquids. It recently undertook a quality-improvement program to confirm that the bottles processed and delivered from its plant had proper labels on both their front and back surfaces.

Line workers previously checked each bottle visually for label presence before packing the bottles in a case. To automate and error-proof the process, the DPT engineering department began evaluating various vision systems and sensors.

System evaluation
The company first examined a vision system that reliably detected whether each bottle had a label. The system was accurate in inspecting for label presence or absence, as well as for checking for several other container attributes. But it also came with a complex set of software tools that were not required for the label-presence application, and these tools would add tens of thousands of dollars to system cost. This system also involved expensive training and maintenance costs, as well as more operational complexity than required to detect labels.

Th 68567
FIGURE 2. PresencePLUS pixel-counting sensor can be connected to a notebook PC. The computer can be used to program the sensor and view the images of the bottles passing in the background for the presence or absence of a label.
Click here to enlarge image

DPT also considered a teachable, low-contrast, fiberoptic sensor from Banner Engineering. In this vision system, a photoelectric sensor was used as a "gate" sensor to send a signal to a programmable logic controller (PLC) when it sensed the leading edge of each bottle. The PLC then signaled the fiberoptic sensor to begin inspecting and determining whether it was receiving light reflected from a label (label present) or from a bottle (label missing). It would then activate a light and an alarm when it did not sense a label. The initial cost of this sensing system was much lower when compared with the initial vision system, and its operation was much simpler.

However, the fiberoptic sensor did not have the required flexibility to accommodate more than 400 types of bottles of many shapes, sizes, colors, and materials that DPT produces. In addition, the labels themselves come in many shapes, sizes, and colors. For each production-line change, the fiberoptic sensor had to be physically repositioned to sense each new bottle size and shape, and the sensor amplifier had to be recalibrated. Moreover, some bottle-and-label combinations required changing to another sensor amplifier to emit a different colored beam, such as green, blue, red, or white. These line-change complications made the fiberoptic system labor- and time-intensive and costly.

Enter PresencePLUS
Next, the drug packager assessed Banner's PresencePLUS pixel-counting sensor as a candidate for the label-detection application. Like the fiberoptic system, a photoelectric gate senses the leading edge of the bottles and then triggers the PresencePLUS sensor into inspection mode. But, unlike the single-point fiberoptic sensor, PresencePLUS scans a wide area of 1.3 x 1.0 in., which means the sensor does not have to be mechanically repositioned for production-line changes.

The sensor captures 512 x 384-pixel gray-scale images of the bottles processed on DPT's production lines. The sensor then converts the gray-scale images to black or white pixels (depending on a user-adjusted threshold), counts the pixels, and, based on the count, renders a "pass" or "fail" judgment. When a bottle is missing one or more labels, the PresencePLUS triggers a warning light and sounds an alarm so that this bottle can be manually rejected. Newer DPT labeling lines are equipped with PresencePLUS sensors that automatically divert unlabeled bottles to a reject station.

Th 68568
Click here to enlarge image

FIGURE 3. PresencePLUS sensor captures 512 x 384-pixel gray-scale images of the bottles processed on a production line. The sensor converts the gray-scale images to black or white pixels, counts the pixels, and renders a "pass" or "fail" judgment. When a bottle is missing one or more labels, the sensor triggers a warning light and sounds an alarm so that this bottle is rejected.

Jeff Schmitz, Banner's corporate business manager for vision systems, describes PresencePLUS as a package that comprises a 24-Vdc-powered sensor with three solid-state outputs. The outputs can be programmed for functions such as pass, fail, fail high, fail low, output ready, and sensor fail. Both the sensor hardware and software are designed and produced by Banner. The sensor incorporates an off-the-shelf PB-300 CMOS 1/3-in. imager from Photobit Corp. (Pasadena, CA), paired with a proprietary microprocessor. Attached to the front face of the sensor are an off-the-shelf C-mounted lens and an LED (light-emitting diode) ringlight source; the ringlight is also made by Banner.

The system is set up using Windows-based software residing either on a user's PC or on a Banner PRC1 hand-held controller (see Fig. 2). This controller is similar to a personal digital assistant and can display compressed versions of the captured images, programming options, or diagnostics on its 128 x 64-pixel LCD (liquid-crystal display) screen (see Fig. 3).

How it works
A Banner-built photoelectric cell initiates the imaging process upon sensing the leading edge of a bottle on a conveyor as it passes the imaging station. The cell's output signal activates the pixel-counting sensor, which strobes an LED ringlight. In 50 ms, the sensor captures a 512 x 384-pixel gray-scale image of the passing container, converts it into a binary image, counts the white pixels, and executes an output signal if the bottle is missing a label.

"The sensor may count, say, 50,000 white pixels," Schmitz says, "which means that a label is present if that value falls within the user's taught pixel-count range." After learning the pixel count of "good" bottles with labels present and "bad" bottles with labels missing, the sensor establishes a window for acceptable pixel counts. It subsequently "passes" images that fall within the pixel-count range and "fails" images above or below the pixel-count range.

The DPT production lines run continuously with three eight-hour shifts per day. As many as four times each shift, the line is changed to another label-and-bottle combination. The company uses more than 40 technicians to conduct these line changes. Part of its line-change routine is to run several bottles with labels and several bottles without labels to "teach" the PresencePLUS sensor which bottles to pass and which to fail.

Before teaching the sensor, the production operator places a labeled bottle in front of the PresencePLUS sensor. Using a function called Quickstart, the operator adjusts the system's brightness level until the compressed image clearly shows the label and bottle. The brightness adjustment controls the binary threshold level of the gray-scale image captured by the PresencePLUS CMOS imager.

Schmitz explains that between production runs, the Teach mode is activated by the operator, who communicates with the sensor using a hand-held PRC1 controller/teaching pendant. The operator initially cycles ten correctly labeled bottles through the line and then ten bottles without labels. Each time a bottle passes the trigger sensor into the PresencePLUS sensor's field of view, a live image is captured by strobing the ringlight source. A compressed version of the image is then shown on the PRC1 LCD screen.

The teaching pendant is given only to authorized operators; it is not needed for sensor operation. The absence of buttons or potentiometers on the sensor itself prevents line workers from inadvertently bumping the sensor out of calibration and causing downtime. However, because of frequent product changes and the abundance of line workers, the teaching pendants remain connected to their sensors and attached to DPT's labeling machines.

A security code must be entered so that only authorized DPT technicians can teach new run-time parameters to the sensor. While the line is running, the teaching pendants are configured to continually display the "run-judge" screen and dynamically displaying current condensed images, numerical pixel counts, and pass or fail percentages.

DPT is considering additional applications for the PresencePLUS pixel-counting sensor, including the inspection of bottles for the presence of date-code printing.

Company Information
Banner Engineering Corp.
Minneapolis, MN 55441
Web: www.bannerengineering.com

DPT Laboratories
San Antonio, TX 78215
Web: www.dptlabs.com

Photobit Corp.
Pasadena, CA 91101
Web: www.photobit.com

More in Boards & Software