![](/FE/2001/05/Files/Images/80080.jpg)
As a leading manufacturer of gourmet spices, San Luis Obispo, Calif.-based Spice Hunter recognizes the importance of shelf appearance and is committed to the aesthetic quality of its distinctive square-shaped jars.
Since the company produces about 45,000 spice jars daily ranging from nutmeg to chili powder, costly and time-consuming manual inspection of the packaged product was only conducted on a random sample basis. As a result, imperfect jars would occasionally go undetected. "We needed to get as close as possible to zero defects, and quickly realized in our research effort that machine vision technology was a viable way to meet our packaging quality goals," recalled Tim Ewen, quality manager at Spice Hunter.
An In-Sight vision sensor from Cognex seemed to have "the right tools for the job, at a price we could justify," Priebe said.
Overcoming obstacles
According to Cristina Fein, a Cognex applications engineer, the vision sensor also seemed better suited for the application than a PC-based vision system. "Spice Hunter intuitively felt that since it wanted to do multiple inspections, it needed a vision system with multiple cameras," she said, noting that the company could perform label, cap and freshness seal inspections all at once with the product.The design of the jars presented unique challenges for the vision sensor to overcome if the product was to perform properly. "At fairly high speeds, the sensor had to deal with glossy labels, glass bottles and shiny caps," Fein recalled. Further complicating matters was the facility's ambient lighting, which could vary considerably. To test the vision sensor, Spice Hunter sent the manufacturer a variety of jar samples -- "not just good and bad jars, but marginal as well, since marginal parts are where most vision systems fail," Fein explained.
Having proved capable of performing all three inspections during evaluation, the In-Sight vision sensor was purchased and installed on the production line. With just a basic understanding of conventional spreadsheets, Spice Hunter manufacturing engineer Pete Priebe was able to use the product's unique vision spreadsheet environment to set up the application. Vision tools and parameters are selected from drop-down menus using a handheld control pad that resembles a video game controller. The vision spreadsheet then automatically generates tool results into worksheet cells, which can easily be linked together to set up the label, cap and freshness seal inspections. Since the spreadsheet is transparent, the user can see a reference image of the object, and the vision tools being applied to the image, without having to switch between separate screens.
In motion
On the production line, the vision sensor's digital camera is mounted perpendicular to the spice jars at a camera-to-subject distance of about 18 inches. The camera connects to an industrial-hardened vision processor that links directly to a standard VGA monitor. Because the vision processor is a stand-alone unit, it does not require the use of a PC during set up or run time.As the process begins, raw glass jars are first moved from boxes onto the turntable, which rotates them onto a feeding conveyor. The jars move through various stations, where they are filled, banded, capped and labeled. Once they leave the labeler, the jars -- spaced 2.5 inches apart -- move towards the inspection point. To achieve the highest image contrast, a bright white board is located directly behind the inspection point, and basic front lighting is used to illuminate each jar as it comes into view. When a jar arrives at the inspection point, a sensor triggers the camera to capture an image of the moving jar and the image is instantly transmitted to the In-Sight processor. The image is then processed and analyzed using a variety of vision software tools.
When setting up the application, Priebe needed to pick two features common to all jars as reference points from which all measurements would be made. "The features that seemed to work best were the leading edge of the jar and cap, since those two features are consistent in their positions no mater what type of jar is being run," Priebe explained. In-Sight's PatFind pattern matching tool is used to verify that the cap and freshness seal are present, and that the cap is properly seated on the jar. The PatFind tool was selected for its ability to locate patterns on the jars even as the jars move around on the loosely fixtured conveyor.
Labels are then checked for skew, which involves the use of edge detection tools to measure the distance between the leading edge of the jar and closest vertical label edge. The label position needs to fall within a tolerance of 3/16 inches, which the company believes is necessary the labels to line up perfectly as the jars sit on grocery store shelves. The entire inspection sequence happens in approximately 300 milliseconds, keeping pace with a line speed of 200 jars per minute set by the labeling machine.
Jars that pass proceed down the line to a bundling station, where they are packaged and shipped. However, if a jar fails any of the inspections, the vision sensor sends a reject signal via its on-board discrete I/O to a PLC, which then triggers a pneumatic gate to kick the jar off the line into a reject bin. These jars are washed off and re-queued back into line.
In addition to performing the inspections at required line speeds, the vision sensor helps to improve process control. If several label or cap problems in a row are detected, for example, this may alert line operators that the labeler or capping machine requires adjustment. The sensor also records pass/fail data for each jar inspected, including data on the types of defects found.