Choosing a camera for inspection: Color or monochrome?
Matt Tardiff, Edmund Industrial Optics -- Test & Measurement World, 5/1/2004
When assembling a machine-vision system, a designer must inevitably decide between color and monochrome cameras. Too often, designers make this decision without understanding how the choice affects system performance. Many vision systems include color cameras simply because end users feel more comfortable with color images, an issue of aesthetics rather than performance. In contrast, some designers may specify monochrome cameras assuming that they cost less, which is not always the case. The best decision must consider the strengths and weaknesses of each approach so end users get the best value for their applications.
When you need high resolutionA single pixel can yield only intensity information about the light wavelengths that fall on it. Most color cameras determine pixel color with a combination of filters (such as the Bayer-type filter depicted in Figure 1) and interpolation from the intensity values of neighboring pixels. (For more information about how color cameras work, see the tutorial in Ref. 1.) This interpolation inevitably reduces resolution. For example, the arrangement of blue and red pixel sites in a Bayer filter makes a single-imager color camera prone to horizontal and vertical artifacts, especially on objects with straight edges that follow a row or column. For this reason, designers often prefer monochrome cameras when resolution is of utmost importance.
Applications that require both color and the highest possible resolution need another alternative—a color-imaging system that does not interpolate. In this case, three separate sensors gather three-color channels of information. A separating prism mounted in front of the three sensors directs the red, green, and blue light to the appropriate detector chip. While the three-chip color camera offers resolution that rivals that of a monochrome camera, the prism and additional sensors make this solution much more expensive. They also consume more power than their single-chip cousins.
In addition, although the sensors in three-chip color cameras may rival the resolution of single-chip monochrome sensors of the same size, large-format three-chip cameras are not readily available. Often, you can achieve the necessary resolution on a large-format single-chip color camera by choosing video lenses with an appropriately adjusted magnification.
An inspection exampleAn inspection system that must determine whether fuses are properly placed in an electrical harness often requires a computer to make color differentiation decisions. Because fuses are color coded, like the red and green samples in Figure 2a, your first instinct might be to use a color camera. If the application required human visual inspection on an analog monitor, a color camera would represent a good choice. The inspector would find it easier to identify the components if they were in color.
If, on the other hand, a computer performs the inspection—and if it must only differentiate a few colors—a monochrome camera may provide an effective and less-expensive solution. Most image-processing algorithms process pictures to a pixel depth of 8 bits. A color camera would extract the three color planes from each image and analyze three separate color channels. A final pass-fail decision would have to weigh each analysis against the others. The resulting lengthy processing time of the images could slow the inspection step, limiting system throughput. In this case, image-processing speed and higher resolution requirements favor a monochrome camera.
A monochrome camera, however, cannot differentiate colors well. As Figure 2b shows, a monochrome image of the four fuses from Figure 2a yields very poor contrast between the colors. Significant color variations within batches of similar filters can produce erroneous results. Adding a color filter to the system typically improves contrast (Ref. 2). Figure 2c shows an image obtained by supplying a monochrome camera with a red color filter, clearly distinguishing the red from the green fuses.
Figure 3 displays each fuse's mean pixel value for a three-chip color camera, a monochrome camera, and a monochrome camera with a red filter. A computer examined pixel values within a region of interest on each fuse and calculated its mean. The red filter increased mean pixel value separation on the monochrome camera by a factor of seven, all but eliminating incorrect readings caused by color variations. So, a filtered monochrome camera works fast and can provide sufficient contrast for two-color applications.
If the application involves additional colors, however, a monochrome camera would probably not be enough. Instead, inspection parameters would define each fuse as a ratio between mean pixel values in the three different color planes. Therefore, applications that do not permit compromise on either resolution or color require a three-chip color camera; the greater processing time becomes unavoidable.
The choice of color vs. monochrome cameras for machine-vision applications is not always obvious. System designers must look at the tradeoffs—processing time, resolution, pass/fail-decision accuracy, power consumption, and, of course, cost—to make the best decision for each situation.
| Author Information |
| Matthew Tardiff graduated in 2002 with a BS in Optics from the University of Rochester. He is currently an optical manufacturing engineer at Edmund Industrial Optics. |
| References |
|


















