Shedding Light on Machine Vision

GIGO. It’s as true for information technology today as it ever was. Garbage in = garbage out. When it comes to machine vision, however, the old computer acronym can be updated: Good images = good output. Desirable machine vision GIGO starts with lighting. “The very first step in devising a machine vision system should be the lighting,” says Siemens business manager for machine...

By Control Engineering Staff May 1, 2008

GIGO. It’s as true for information technology today as it ever was. Garbage in = garbage out. When it comes to machine vision, however, the old computer acronym can be updated: Good images = good output.

Desirable machine vision GIGO starts with lighting. “The very first step in devising a machine vision system should be the lighting,” says Siemens business manager for machine vision, John Agapakis. “You shed light on the subject and you capture whatever comes back to you with your camera and lens.”

Agapakis notes that the increased processing power of machine vision systems has made it possible to devise algorithms for vision systems to perform better in sub-optimal light, seemingly negating the need for optimal lighting conditions. However, the image processing power required in such applications detracts significantly from any savings gained by sidestepping the purchase of the right lighting. Such low-light imaging setups not only cost computing cycles, cutting into the system’s ability to do something else, they can also increase scrap and introduce product or process variability.

The general rule of thumb when it comes to machine vision lighting is that the best lighting results in the most contrast, which pays off in less load on the system, better repeatability, and improved performance overall.

To address the critical importance of lighting in machine vision applications, Siemens offers the NERLITE lighting line to complement its portfolio of SIMATIC smart cameras and vision systems. Its smart cameras have integrated processors, while its vision systems handle processing on a PC.

Match lighting to the application

To understand how important the right light can be for machine vision, try a simple experiment. Take a magazine outside on a sunny day and open it. The pages are easy to read. Tilt the magazine, though, and the glare can wash out everything.

Your eyeballs and optic nerves, didn’t change. The algorithms processing the captured image, acquired in childhood when you learned to read, are the same. The intensity of the light is unaltered. All that’s different is the angle of illumination. That change, however, is enough to make or break a particular vision-related task.

Jon Chouinard, NERLITE market development manager, has seen this occur in machine vision applications. In one case, a customer required the dimensional measurements of a metal stamped part be captured to ensure specifications were met and for process control reasons. The customer had pressed the part against a backlight to capture measurements with a machine vision system. Simply adding some space between the light and part increased the contrast and paid dividends in dimensional measurement repeatability. “We saw the jitter—the change in that measurement—go down to just a few pixels versus many pixels,” says Chouinard. “The position of the light really made the application more robust.”

However, it is not all about location of part and light. Sometimes it’s about the type of lighting. The ring light, for example, is an inexpensive and common lighting solution and is therefore often the first lighting solution considered for machine vision applications. Unfortunately, savings on the light source may be outweighed by costs elsewhere.

One example of where ring lights may not be the optimal choice is when measuring a highly reflective part machined to precisely mate with other components. Even when the part is surrounded by a dark background, poor contrast can result as a result of the highly reflective surface when illuminated by a ring light.

Repeated measurements of the diameter of such a part reveal a 1 Sigma Dynamic Repeatability on Diameter = 0.080 mils when using a ring light. With on-axis illumination coming from overhead, that figure drops to just 27. The increased repeatability from 80 to 27—is enough to increase yield significantly, as fewer good parts would be scrapped for an erroneous out-of-spec reading.

Despite their drawbacks in certain applications, ring lights do have a useful place in machine vision. As Chouinard points out, “When you get into easy things, such as capturing characters on a matte or dull piece of paper, that’s when ring lights are a viable solution.”

Lighting options for numerous scenarios

In anything more complicated than a simple illumination application, engineers have to consider a variety of factors. Is the surface flat, slightly bumpy or very bumpy? Matte or shiny? Curved or flat? Even from such a short list of possibilities, it’s clear that no one light would be suitable for all applications. To address this issue, Siemens offers 11 different product categories of NERLITE lighting for machine vision.

Ring lights and array lights are available for those occasions when surfaces are flat and diffused. For cases where outside dimensions must be measured or openings viewed, backlights work best. When only the contour of a part needs to be imaged, dark-field illumination is the choice. Among other applications, dark-field lighting is used to spot sidewall cracks in glass bottles—an inspection task difficult to do with other types of illumination.

Other NERLITE lighting options include diffuse on-axis light (DOAL), in which light reflecting off a beam splitter strikes an object at nearly a right angle. In such applications, specular, that is to say mirror-like, surfaces appear illuminated while those at an angle appear dark. Non-specular surfaces absorb the light and also appear dark. That’s why this type of light improves measurement repeatability for machined parts.

In a square continuous diffuse illuminator (SCDI), reflection of light off a beam splitter is again used, but in this case the light source is tilted parallel to the beam splitter. This change increases uniformity for non-planar specular surfaces.

Another category of machine vision lighting is the cloudy day illuminator, or CDI. Here light is reflected off a spherical surface from two sources. The result is light coverage of nearly 170°. This can be the best choice for an uneven specular surface.

CDI saved the day for one manufacturer that wrapped its products in cellophane. Simple lighting schemes would lead to reflections that made it difficult to see the lettering of the product inside the cellophane. As a result, there were many false rejects of perfectly good parts. “With CDI,” says Chouinard, “the cellophane wrapper basically disappeared from view in the machine vision camera so that it could clearly see what was underneath. Simply adjusting the lighting to CDI made it possible to fix the problem without interfering with algorithms or pattern matching.”

Wavelength considerations and LED applications

Beyond variations in the angle of illumination, other lighting parameters to evaluate include the wavelength of the source. If you have a metal part marked with blue ink, for example, consider viewing the part using illumination from the opposite end of the color spectrum. Red illumination will make the blue mark stand out and improve contrast.

Because some inks have the potential to fluoresce, the use of ultraviolet light may make it easy to view what might otherwise be a difficult image to capture. Infrared light sources serve a similar purpose. A new series of backlights with a wide variety of wavelength configurations are available from Siemens to address such issues.

Light emitting diodes (LEDs), are the primary source for machine vision illumination. They are inexpensive, rugged, long lived, and offer the special advantage of being fairly monochromatic. Machine vision repeatability is more easily achieved if only a narrow band of wavelengths travel from the source, through lenses and other optical elements, and into the camera.

Additional techniques to further improve LED performance in machine vision applications include strobing a light to improve performance when inspecting moving parts. Strobe lighting stops pixel blur to help capture parts in motion, but intensity of image capture drops because the light is off part of the time.

Siemens’ lighting circumvents this issue through clever engineering. “We synchronize the pulse of our light with the camera using a controller and we overdrive the LED,” explains Chouinard. For a brief time, the LED may have many times the recommended current flowing through it, upping its intensity considerably. The benefit for the machine vision application is an improved image and better repeatability. In order to pull off this technique successfully, though, it is necessary to really understand what makes an LED tick and know how far they can safely be pushed, knowledge that Siemens has gained through years of experience and investigation.

Making the right selection

Since lighting is so important to machine vision applications, this leads to a natural question: Why not simply build vision systems with the right lighting?

The answer has to do with usage, notes Agapakis. Machine vision systems extract useful information from digital images, and what’s useful in one context may be unimportant in another. For example, the dimension of a part may be important in one application, but in another, it’s the absence or presence of a component that matters most. In the next application, it might be the lettering on a label that’s most critical.

When the situation is very predictable, it may make sense to build the light source into the vision system. Such is the case for data matrix readers—devices that capture a 2D bar code on a part. Advances in image analysis algorithms allow products in the Siemens Hawkeye series to be integrated into the device and offer a robust solution for reading data matrix marks in very low-contrast situations.

At the other end of the spectrum, Siemens offers a smart camera called the UID compliance verifier, which has 10 different built-in lights. The device is intelligent enough to evaluate the different built-in lights against the application and select the best, either on its own or via operator interaction.

With such high-levels of onboard intelligence, such products are not inexpensive and may be overkill for some applications. But in cases where it is not always possible to predict which lighting system will be best for a given application, but only one will be optimum, any other lighting and vision system would just add to overall costs without producing a process-streamlining benefit.

“To minimize the installed cost of the system, it’s important to dedicate one single light that is the best for the given application,” explains Agapakis.

Because production variety leads to different illumination requirements that cannot be satisfied by a single light source, Siemens offers its SIMATIC machine vision systems and smart cameras, along with a diverse array of NERLITE lighting products. This combination of product lines, backed by the expertise needed to analyze a given situation and develop a useful vision and lighting solution, assures good images in and, therefore, good data and products out.


Related Resources