Feature Articles

Is Your Machine Vision System Color Blind?

Systems can produce three times the data (or less than one-third the resolution) of a monochrome camera solution. Color can introduce more potential sources for imaging errors, more complexity, more cost, and require careful engineering that reduces the system’s flexibility to deal with lines that make products of varying shape, colors, and size. In fact, if designers can find a way to use filters and lighting to measure a colored area using monochrome cameras, they usually do.

However, for many applications ranging from electronic manufacturing to printing and food processing, color is the only way to solve the problem. Let’s look at some of the considerations a system design needs to take into account to create a successful color machine vision solution, including careful matching of camera, optics, and light source.

Is Three Company?“JAI has solid offerings on both sides of color, meaning single-chip Bayer filter color cameras and color cameras with three CCD sensors or more, including a four-line multispectral color camera that offers separate sensors for red, green, blue, and near infrared,” explains Steve Kinney, Director of Technical Pre-Sales and Support at JAI Inc., USA (San Jose, California).

When customers come to JAI to discuss a color application, Kinney starts by asking what sort of spatial accuracy the system needs versus color accuracy. “It also depends on data rate,” he adds. “If you need absolute color accuracy of less than 1%, then we usually look at a three-CCD prism camera solution. If spatial accuracy over a wide inspection area is more important, then a very-high-resolution single-chip Bayer camera may be better. If you need high speed, CMOS offers higher frame rates and multi-line sensors with NIR capability and is very effective for high-speed printing applications where colorimetry measurements are very important because NIR can help you judge between true black ink and black made by combining cyan-magenta-yellow inks. And for some printing applications, knowing the difference is important for quality purposes.”

Today, printed circuit boards require more color vision solutions because the color of a component helps to identify each part. Plugs and connectors are color coded, and at the same time, the board is tracked using a black-and-white barcode. “These applications used to be done with a high-resolution monochrome camera, but now, you need to be able to sense color to make sure the right component and connector are in the right place,” Kinney explains. “The barcode will usually be located at the edge of the frame. If you use a single-chip color camera, you have to be concerned about color shading and halos at the edge of the image, and it’s made worse if you use cheap optics.”

Color aberrations come in two flavors: axial, where the different wavelengths of light cause each color to focus on a different focal plane or distance from the optic, as well as transverse or longitudinal distortion, where a magnification causes different colors to focus on different points on the same focal plane even when they originate from the same point in front of the camera. Both effects can reduce contrast or produce halo effects in the image. While an electronics manufacturer will likely want the fastest possible frame rate and therefore ask for a high-resolution, high-frame-rate single-color camera solution such as JAI’s SP-20000 with 20 megapixel (MP) CMOSIS full-frame sensor (43.3 mm diagonal), the designer needs to be aware of potential lateral distortion and correct the problem through optical or software methods.

For colorimetric applications that require absolute color measurements (what is the exact red value) versus relative color measurements (which of these reds is the most saturated), three CCD chips offer better color accuracy. Precision dichroic coatings with sharp responses separate colored light better than color dyes used in single-chip Bayer filter solutions, allowing less color crosstalk between pixels. The use of low F-number prisms maximizes light throughput and maintains the color information with high spatial accuracy needed to give good results at the pixel level. However, three-CCD-chip cameras have their own design challenges, too.

Matching Optics to Color Cameras
“There are different types of lenses for a single-chip and three-chip camera,” explains Greg Hollows, Director of Machine Vision Solutions at Edmund Optics Inc. (Barrington, New Jersey). “Lenses are designed for the light to pass through the lens and air – for the most part – before it reaches the sensor. But with a three-CCD camera, you have an additional 10 to 15 mm of glass in the prism. If you use a lens designed for a single-chip color camera on a three-chip camera, the path length changes and you add aberrational effects that hurt the imaging beyond just the color information.”

This means that an optic for a more expensive three-chip solution may also be more expensive because it requires an optic that uses more layers of optical materials to correct for the chromatic aberration, prism, and other sources of optical distortion. And while some might think you can correct this sort of distortion in software, it may not be that easy. “If you knew the exact part dimensions and colors, maybe you could correct the image using look-up tables, but any change in color, shape, or lighting could throw that correction off,” Hollows adds.

Most color machine vision lenses are either achromatic, which means they focus two of the three primary colors on the same focal plane, or the more expensive apochromatic solution, which can focus three colors on the same plane and correct for spherical aberration for two colors instead of just one color as with achromatic lenses. “Life sciences are one of the biggest users of apochromatic lenses because, in fluorescence microscopy, for example, they need to capture small details across a large area and wide spectrum,” says Hollows. “It can be the same for flat-panel inspection, too.”

In general, Hollows reminds designers that long focal lengths and large pixels are more forgiving for color applications when it comes to focus and limiting the effects of distortion. “Designers need to remember that different camera makers have different approaches to converting electronics into color values and how they use compression and its effects on color information,” he notes. “And you have to remember that in absolute color measurement applications, even heat generated by the cameras or nearby equipment can affect your measurements from how the camera responds to the spectrum and intensity coming from your light source. Color systems often require more frequent calibration.”

Daylight in a Box
For imaging applications that need to measure multiple colors, white LED lights have supplanted halogen and fluorescent lights for a number of reasons, including LEDs’ ability to offer a wider range of colors and varieties of “white” light, also referred to as the color temperature.

“We offer white LEDs that run from cool blue-whites around 6500 Kelvin to neutral whites around 4000 K to warm whites at 2200 K that have more red in them,” says Oliver Szeto, President of Metaphase Technologies Inc. (Philadelphia, Pennsylvania). “While we see a lot of machine vision applications use the 6000 K cool whites because of high output, there’s also a trend toward lights that more closely mimic natural sunlight, around 3500 K.” For color machine vision applications that require accurate color measurements, a light’s color rendering index (CRI) is important because it quantifies how closely the light will reproduce colors compared to a reference light source, usually daylight.

White LEDs are made one of two ways: by applying a phosphor coating over a blue LED light that produces a broadband light closer to white light, or by mixing different-colored LEDs to make a broadband light source. Both methods result in a spectral continuum that is higher in some narrow wavelength bands within the white light spectrum compared to others. For the most challenging color vision applications, designers need to carefully match these “spikes” to the specific wavelengths. This is where choosing a lighting supplier with in-house engineers can really help, adds Metaphase’s Technical Sales Manager, Mark Kolvites. A quality supplier will make sure that the actual red, green, and blue (or more) LEDs mix to create a white light, or the blue LEDs with phosphor coating provide uniform illumination without hotspots that can cause trouble for automated inspection systems.

As the information above shows, color machine vision solutions can require in-depth knowledge of the physics behind machine vision. The good news is that by choosing the right supplier and partner, designers can solve applications where success isn’t just black and white.

Comments:

There are currently no comments for this article.

Leave a Comment:

All fields are required, but only your name and comment will be visible (email addresses are kept confidential). Comments are moderated and will not appear immediately. Please no link dropping, no keywords or domains as names; do not spam, and please do not advertise.