Proper lighting is the key to useful machine vision.
Banner Engineering Corp.
Edited by Robert Repas
Not long ago, the cost and complexity of machine vision limited its use to specialty machines and isolated inspections. Today, however, machine vision has proven itself as a practical and affordable method to monitor and control production in factory automation. The basics of vision sensing have not changed: The camera remains a light collector with the digital imager as the core data collection device. Each imager consists of thousands or sometimes millions of microscopic light meters. Thus lighting is the most significant factor when designing robust vision inspections.
An object or target must have enough optical contrast for a vision sensor to see it. Put another way, there must be a detectable change (or delta) in the light received from the target compared to everything else in the camera’s field-of-view (FOV). Controlled lighting creates this contrast.
There are many stories about the vision application that ran flawlessly during first shift, but began failing “good” items over second and third shifts after the sun set. Plant windows and skylights produce drastically changing, uncontrolled light that interferes with the repeatable contrast necessary for successful vision sensing.
Even the flashing warning beacons on forklifts moving around the plant floor contribute to the overall light pollution. Thus, a repeatable vision application demands lighting that remains controlled and consistent. It must also be immune to the inconsistent and fluctuating light levels in its environment.
One of the three techniques commonly used to combat fluctuating ambient light involves controlled high-intensity lamps. The lamps flood the target or feature with excessive radiant energy rendering any ambient light insignificant to the camera.
The second technique resembles the first, except for the use of highintensity infrared light to optically shroud the object. A high-pass infrared filter goes over the camera lens or imager to block visible light of less than 850-nm wavelength and pass infrared light with wavelengths longer than 850 nm.
The third and most effective technique is to mechanically shroud the application from ambient light. This technique works best if sunlight can reach the sensor field of view. Sunlight contains so much visible and infrared light energy that a high-intensity controlled light source cannot overcome it. It must be blocked by an opaque barrier.
If all plants manufactured the same widgets, lighting selection would be unnecessary. Vision sensors would be equipped with a universal light source that creates optimal contrast on this all-common widget. But the vast variation in manufactured products and features forces use of numerous lighting techniques. Thus the background and the optical properties of the products to be sensed form a good starting point for selecting a lighting technique.
The exploitation of four optical properties help separate the target or feature of interest from its background. These properties are shape, translucency, texture, and color.
Suppose shape is the target feature of interest. An example would be detecting the presence and spacing of a stamped-metal connector pin. Then a lighting technique that provides the greatest contrast fits the needs. The greatest contrast comes from backlighting the object: An evenly distributed light source behind the target is aimed directly at the camera. The object under examination blocks the backlight, presenting a high-contrast silhouette to the camera. The object to be sensed is significantly darker, contrasting the bright backlight shining directly into the camera. A backlight silhouetting a hypodermic needle lets the vision system gauge the needle’s diameter, length, and correct placement in the syringe.
Backlighting should also be used in applications where the translucency of the feature being examined differs from the translucency of the other components of the part. The amount of light energy that “burns through” the feature of interest contrasts with the amount of light attenuated from the rest of the part.
For example, backlighting can be used to sense for the presence of fill tubes or other foreign materials in a PET (polyethylene-terephthalate) beverage bottle. The backlight shines through the container and beverage, but the light is blocked by any opaque objects in the bottle.
Backlights can also help measure fill level, even with clear liquids. The meniscus at the top of the liquid attenuates more light than the liquid itself giving an indication of liquid level. And the contrast created by backlighting even lets vision systems read the lettering on clear tubes and plastic bags such as those used to administer IV fluids.
A potential problem to be aware of with backlighting is that light can wrap around the opaque target, making reflections from the sides and front surface a problem. This wraparound effect makes shape measurements inaccurate and inconsistent. Two simple techniques combat the wraparound problem. First, lengthening the distance between the backlight and target tends to collimate the light rays reaching the target and camera. Nonperpendicular rays from a more-distant diffused backlight scatter away from the edge of the target prior to reaching it. A second technique is to mask extraneous areas of a backlight, reducing the light radiated from unnecessary directions.
Unfortunately, a high-contrast backlight is not an option when the features of interest are texture or color. Backlighting also fails when the shape difference presents itself in the Z plane rather than the X and Y plane of the camera’s FOV. These instances demand front surface lighting.
As its name says, front-surface lighting illuminates the front of the target. However, one must be aware of two different effects with front-surface lighting. These effects are known as the bright field and dark field. They arise from the position of the lights shining on the front surface.
The bright-field is the area perpendicular to and directly adjacent to the camera lens above the part. The dark-field begins at the point parallel to the part’s surface and extends to low angles on the sides between the camera and the part.
The simplest bright-field light, and the light to experiment with before any other front surface lighting, is a ring light. A basic ring light surrounds the camera lens, directing light straight at the target object. Conveniently, the ring light usually mounts directly to the camera. So mechanically adjusting the camera angle for the best target image also adjusts the attached light.
Ring lights are excellent for label orientation, bar-code verification, and other applications with straightforward contrast. Vision sensors are easily configured to detect the correct position of a label or what a bar code should read. In such cases ring lighting’s main purpose is to illuminate the examined part well enough to obtain an accurate reading. This method is also ideal for packaging inspection and product placement verification in automated processes.
Several techniques improve the performance of ring lights. In some applications, the only difference between the feature of interest and its background is color. Color is the intensity and reflectance of different light frequencies, so it follows that colored lights and filters positioned over the camera imager help enhance contrast. Lights and filters of the opposite color provide the best contrast. A color wheel can help make those selections.
A dark-green-shaded background mostly absorbs a beam of 700-nm red light, while a redshaded feature intensely reflects the same beam. If the red-shaded feature is printed on a white label, the white label reflects the red light as well as the red feature so there will be no contrast between the two. However, substituting a 550-nm green light in place of the 700-nm red light creates contrast with the white label because the green light is mostly absorbed by the red-shaded feature. To meet the wide variety of applications, ring lights come in many visible colors as well as infrared models.
When the color difference between the target and background is subtle, as shown by neighboring colors on the color wheel, then a grayscale vision camera won’t work effectively. For those situations it’s best to use a color vision sensor with white (all-color) light.
Backlights and ring lights are essentially the bread and butter of machine-vision illumination. However, some applications come up short on optical contrast and so require other lighting techniques.
While ring lights are convenient, they can also produce distinctively brighter “hot spots” of illumination. More exacting bright-field illumination comes from on-axis lights. On-axis lights emit a collimated, even-intensity field of light on the same axis as the camera. But their installation is a bit more challenging because they must mount between the camera and its target, rather than directly on the camera. Also, the onaxis light’s diffuser and beam-splitter significantly reduce the amount of light reflected back to the camera. Still, for applications such as reading print on brushed metal, onaxis lights are ideal.
Sometimes the differentiating feature is texture at a microscopic level. Area lights can deliver illumination at nonperpendicular angles to bounce glare from polished, smooth, “shiny” textures away from the camera and allow more diffuse surface textures to reflect light into the camera. Area lights can mount completely in the dark field, a technique also known as low-angle lighting, or at virtually any angle to deliver greater flexibility to exploit surface texture differences.
Light rays reflect at their angle of incidence. So under dark-field lighting smooth flat surfaces, like polished metal, reflect light away from the lens, while more diffuse surfaces, such as paper, reflect a portion of the light into the lens. For example, an area light mounted at a 15° angle to the camera lens reflects any glare from a polished metal surface away from the camera. Meanwhile, less evenly textured surfaces diffuse this light into the camera for easy sensing. Identifying the ideal angle for area lights typically requires experimentation.
Multiple area lights positioned at low angles create contrast for shape and texture differences on larger objects. But a more-perfect dark-field illuminator is the low-angle or indirect ring light. This ring light is applied as close to the target as possible and creates an even, lowangled illumination to exploit shape and texture differences on the target.
Inspection of circuit-board components requires indirect lighting. Low-angle ring lights prove extremely useful by yielding what is essentially a “negative” of the image that would be created with an on-axis light. With low-angle ring lights, circuit-board components like solder, pins, ceramic, and plastic materials reflect different amounts of light. The vision sensor easily detects the differences in contrast. Low-angle ring lights are also commonly used to highlight scratches or flaws in metal surfaces, as they will intensely reflect indented features such as etched or stamped bar codes or text on an inspected part.
LEDs (light emitting diodes) have become the preferred light source in modern machine vision for backlights, as well as ring, on-axis, area, and low-angle ring lights. LEDs have several advantages when used for controlled lighting. They typically offer 100,000 hr of consistent illumination. They are also more durable than traditional lights that feature thin glass covers. LEDs can be overdriven and strobed, producing short, bright flashes of light useful for eliminating blur on moving targets. They also produce less heat than halogen or xenon lighting. Finally, they come in a wide choice of specific wavelengths or colors.
Historically, LEDs only produced low-intensity light, so they had to be used in arrays of hundreds or thousands of elements. This made it too costly to illuminate larger spaces. Also, LEDs usually required the lighting, target, and camera to be less than 0.5-m apart. In contrast, halogen bulbs put out an intense light. The light from the bulbs is piped to the sensing operation with fiber-optic cables. This keeps the heat away from the sensing area and makes maintenance of the bulb easier.
However, LED technology is advancing rapidly. Costeffective high-intensity LEDs now find use in traffic signals and even automobile headlights. These modern LEDs deliver the necessary lumens of visible light or radiated energy of infrared light to evenly illuminate large targets. For example, automotive door panels can now be lit with LEDs from more than 4 m away. When combined with the correct technique, installation, and type of lighting, an LED light source can now solve most of the problems facing industrial vision applications.
Because a camera collects, measures, and analyzes light, the importance of controlled, contrast-creating lighting for vision applications cannot be overstated. However, it is more challenging to select the right light source than to read a chart and select the right lens. The lighting selection process often requires experimentation to get the right lights for the application at hand.