The color treatment
Color-based machine vision has historically required more money and processing power than an equivalent monochrome solution, but recently color-based hardware and image-processing products have become more cost effective.
Color-based machine vision has historically required more money and processing power than an equivalent monochrome solution, but recently color-based hardware and image-processing products have become more cost effective. As a result, food inspection has become the leading application to adopt color imaging. Other applications include print or pharmaceutical inspection, PCB assembly, and quality and grading of wood, textiles, and ceramic tiles.
When an inspection application requires the recognition and separation of color, a decision must be made whether to use a system with a color or monochrome camera. Many times this decision is made without truly understanding what tools are available and which system may work best. According to Jason Dougherty at Midwest Optical Systems (Palatine, IL), system integrators and designers will often choose a color camera because, based on personal experience and intuition, it seems to make the most sense.
Dougherty says that basing the decision on appearance rather than on performance can result in a less-than-optimal solution. Because machine-vision applications are now demanding higher frame rates at maximum resolution, state-of-the-art monochrome area-array and line-scan cameras are often the best choice.
Monochrome cameras have a single sensor that determines gray-scale values. Thus, these pixels are only providing information about light intensity, not color. Ultimately, sensors used in color cameras are no different. Most color-camera sensors require an integrated mosaic filter to determine the “color” of the subject matter. This reduces the overall resolution and light sensitivity, while increasing cost. When comparing the two, monochrome cameras, by and large, have higher resolution, better signal-to-noise ratio, increased light sensitivity, and better contrast.
So is it necessary to sacrifice frames per second and at the same time filter out pixels for the benefit of capturing color images? No, says Doughtery. Instead, optical filters can be used to separate colors. Compared to using a color camera, they can often be more effective, inexpensive, and more readily available.
Filters used in traditional photography can be useful in machine-vision applications and will produce similar results, but off-the-shelf photographic filters were not designed for machine vision. The spectral response of a CCD/CMOS sensor is different from that of film and it can be difficult to find filters for the smaller sizes typically used in machine vision. Further, photographic filters often do not offer the higher transmission or the complete blocking of unwanted ambient light required in a vision system.
Dougherty, whose company manufactures optical filters for machine vision, says these filters can be made to match a machine-vision camera’s spectral response and most types of lighting. For example, specific filters are available for monochromatic or white LED lighting, fiberoptic illumination, and structured laser-diode-generated light patterns. When matched with the correct lighting and camera system, filtering is one of the most important factors affecting the ability of an imaging system to produce acceptable results, reduce reliance on algorithms, and eliminate the need for an elaborate shroud to block stray light.
Dougherty cites an example to make his point: sorting bell peppers based on color. Each color commands a different price, with yellow peppers selling for more than orange peppers, which in turn sell for more than red peppers.
Since each color is fairly close to the other in the visible spectrum, many system integrators faced with this task might believe that using a monochrome camera would not result in enough contrast to determine the differences. That assumption may be true; however, a broad, green bandpass optical filter that blocks the red and infrared portions of the spectrum cuts down on the amount of orange and fully passes yellow light. As a result, there is more than enough contrast to determine which pepper is which.
In fact, compared to a color camera, the bandpass filter actually produces maximum contrast. This method may not work when the color variations are more subtle or when more colors may be encountered, but an optical filter can achieve optimal results even when the application is not limited to two-color inspection.
CONARD HOLTON is editor in chief of Vision Systems Design; e-mail: email@example.com.