Machine vision has evolved with - and arguably driven - automated food manufacturing. From material analysis to content control, vision systems comprised of cameras, lighting and software have streamlined production and reduced costs throughout the industry. Vision technology has become so pervasive, in fact, that manufacturers cannot gain a competitive edge simply by integrating cameras in their production line. Instead, they must decipher which vision systems will deliver the best cost/performance ratio for their particular operation.
This can intimidate manufacturers unfamiliar with the jigsaw puzzle of component technologies that shape these systems. Cameras, light sources and optics of varying stripes present a dizzying range of choices, that become more complicated when one realizes that selection of one component often influences and is influenced by the selection of another. The food industry's diversity of processing and packaging applications doesn't help matters. There are, however, some rules of thumb guiding most selection processes that ensure a completed system's performance and cost will closely match an application's needs:
•Identify the application's tolerances - those details that determine whether an object passes or fails inspection.
•Select the most critical component first and buy only the performance you need.
•Select components that are compatible with each other. It is wasteful, for instance, to apply a large-format CCD camera with a short focal length/low-magnification lens that may not file the entire format of the CCD and fail to take full advantage of the camera's full resolution.
•Plan ahead. If a product, process or packaging undergoes frequent changes, select components that easily adapt to new parameters or switch out with modular alternatives.
Despite the variety of both components and food manufacturing applications, most vision systems confront three basic challenges: analyzing portions and/or quality, distinguishing flaws from acceptable features and controlling image quality to ensure the accuracy of inspection data. Again, there is no single universal solution to these challenges, but three applications, examined hereafter, illustrate these problems, and how machine vision engineers approach them.
Portioning and analysis
Portioning applications range from very simple vision operations, such as inspecting precut contents of packaged lunch trays, to very complex analysis, such as ensuring chocolate chip cookies have a certain size, shape, color and chocolate content without appearing to have be too "manufactured."
Fortunately, most of these applications are simple enough that relatively low-cost monochrome cameras serve the purpose. Monochrome cameras deliver better resolution, signal-to-noise ratio, light sensitivity and contrast than similarly priced color cameras. Their sensor element compiles grayscale images from thousands of pixels that assign numeric values to the amount of incident light they collect - zero representing black, the highest number representing white and every number in between representing a shade of gray. Also, due to the way that single-chip color cameras interpolate color information, monochrome cameras deliver 10 percent more resolution than comparable single-chip color cameras. A simple histogram of a high-contrast monochrome image can easily confirm that the sections of a dinner tray are full, empty or somewhere in between. Furthermore, straightforward software analysis can easily determine the size and shape of objects in the image.
Filtering either the light source or the camera optics can further enable monochrome imagers to perform simple color differentiation, as long as only one color needs to be separated out. Slices of red pepperoni, for instance, are distinguishable from portions of yellow cheese and pizza shells, even if all of them are of similar size and shape. Capturing monochrome images through a color filter will make the red pepperoni appear black and the yellowish foods white. It can also help increase contrast in the image.
Larger challenges arise when a vision system must identify two or more colors, or distinguish two different shades of a single color. Examples include foods that discolor over time, multicolored products and packaging.
Using two monochrome cameras with separate filters is often more cost-effective than applying color imaging. Single-chip color cameras serve well with help from more advanced algorithms that separate multiple colors within an image. This is extremely useful for separating red from orange, blue from purple, and even variations of shades of a specific color. However, ensuring strict color accuracy or inspecting multicolored items could require a three-chip camera (also called 3-CCD or RGB cameras).
These devices separate image data into red, green and blue signals, and send each to a separate chip within the camera. This produces better color depth in an image than the interpolated color information produced by a single-chip camera. Three-chip cameras offer the best combination of both color and resolution, yielding excellent spatial resolution and dynamic range. This allows colors of interest to be analyzed at finer levels of detail and can detect slight variations that alternate approaches cannot accurately obtain. Their performance, however, comes at a higher price than single-chip color cameras based on NTSC/PAL and Y-C formats and applies largely to more demanding applications.
Features and flaws
Fruit inspection has become increasingly automated thanks to a number of vision innovations - innovations that also further illustrate color analysis applications. Many fruits, for example, display natural shadings and color variations as well as features such as stems and navels that are difficult to distinguish from bruises, blemishes and punctures.
Detecting blemishes on uniformly colored fruit, such as oranges, is simpler. The filtering techniques described earlier - specifically, applying filters or light of a specific wavelength disclose most blemishes and some punctures in a monochrome image. In any case, the camera should be capable of at least 640 x 480-pixel resolution, which would detect defects measuring roughly 1 percent of the orange's surface.
Inspecting apples or multicolored fruit for discolorations is more problematic. Here, three-chip cameras and high-intensity, white light sources are preferable, but this approach may require pattern recognition software capable of analyzing complex color distributions. Another possibility is to use near-infrared cameras and illumination, which can sometimes distinguish blemishes from colorations visible only in the visible spectrum. Both of these solutions, although effective, will raise the system's overall cost.
Distinguishing small punctures from natural features is another task. Since navels and stems appear in the same general area on a fruit and often display a similar size and shape, standard monochrome cameras again might provide an inexpensive solution with help from basic histograms.
As diverse and adaptable as cameras and software are, however, they cannot solve all imaging problems. As even amateur photographers know, good cameras can deliver bad images, and the most common culprit in vision applications is poor illumination.
Reflective materials, for example, can pose trouble for even high-end vision systems, whether the camera is inspecting food portions or examining fruit. Food trays may be wrapped in cellophane or made of foil. Fruit may be wet or transported on a metallic belt. In all events, poor illumination of reflective elements can cause blooming, hot spots or shadowing in an image and hide important information or cause false edge calculations. Non-uniform lighting can also detract form signal-to-noise ratios and make tasks such as thresholding more difficult. On the positive side, however, skillful illumination schemes can raise the overall cost/performance of a vision system, without the need for high-end detectors, imaging lenses and software.
Good illumination is essential in bottling applications, where vision systems inspect bottle integrity, ensure that labels are properly applied and check cap alignment, fill levels and content purity. Given the different needs of each step, these functions would likely be divided into three stages. All could use standard cameras but would require different optical and illumination configurations.
Preventing good product from going into bad bottles requires vision systems to inspect bottles for chipped tops and cracks. This is within the capability of standard cameras equipped with telecentric lenses and positioned over the bottles. However, lighting can become very complex depending on the design, shape and material from which the bottle is constructed. Many of these applications benefit from diffuse light sources or oblique lighting techniques. Often, direct lighting should be avoided around reflective surfaces or clear surfaces that can produce glare. But directing light along the same axis as the camera's view actually induces a consistent reflection that highlights defects in the image of a bottle top. This approach allows blob analysis to identify defects as irregular white or dark areas.
Standard cameras equipped with standard or telecentric optics can also perform cap alignment, fill level and detection of foreign objects. Diffuse, backlit illumination also serves, although the light source and camera are typically positioned on opposite sides of the bottles. This backlighting arrangement enhances edge contrast in the image and aids software edge tools in detecting misaligned caps or substandard fill levels.
Verifying correct alignment and application of labels is also possible with standard cameras and optics, plus a strobed LED light source to freeze objects in motion at high rates of speed. If the labels appear metallic, then a diffuse light source may serve better.
Highly reflective bottles or labels, however, might require darkfield illumination. More of an approach than a product, this illumination scheme simply angles the lighting so that it reflects at an angle the camera does not capture, making items such as edges or defects appear brightly lit against a dark background. Besides imaging bottles, darkfield illumination is also effective when examining food through cellophane or other reflective films.
Finding a supplier
The principles of specifying and implementing machine vision are simpler to grasp than the details, which is why selecting a quality supplier is essential to getting the performance you need on the factory floor.
It is important to work with established suppliers that can either demonstrate proven commercial experience in food manufacturing or a broad enough range of experience to undertake new applications in this sector. Mature products - those that have been on the market for at least a year or two - are more reliable. However, applications that require higher performance or a longer service life should consider the newest generation of component technology.
The most effective suppliers have active research and development departments to keep up with rapid advances and emerging applications in machine vision. Suppliers should also offer technical support after the sale is made.