Smart lighting choices increase image contrast

Nov. 1, 2008
Today’s machine-vision applications demand a great deal of lighting components since the better the image quality, the greater the chance of properly measuring or detecting features within the image.

Claude Kuhnen

Today’s machine-vision applications demand a great deal of lighting components since the better the image quality, the greater the chance of properly measuring or detecting features within the image. Correct lighting is essential for the success of stable and reliable machine-vision systems since even the best image-processing or machine-vision software cannot compensate for image details that are lost when capturing the image.

To ensure these details are captured, brightfield and darkfield lighting can be used. With brightfield lighting, the sensor and lighting system are aligned so that light is reflected from the surface of the part directly into the sensor. Alternatively, using darkfield lighting, the light source and sensor are positioned so that only diffuse light—for example, from the edges of a part—arrive directly at the sensor.

In some applications, brightfield lighting can cause problems due to reflections. For example, even when imaging black plastic surfaces, brightfield lighting can over-illuminate the white sample to be detected (see Fig. 1). Instead, it is advisable to tip vision sensors with integrated lighting slightly in relation to the surface of the object (e.g., 10°–20°, i.e. darkfield). This avoids direct reflections from the background so that it appears dark and the white imprint, with a diffuse reflection, is simultaneously accentuated. The result is a stable, high-contrast image.

FIGURE 1. When imaging a black plastic surface, brightfield lighting can over-illuminate the white sample to be detected. By tilting a vision sensor with integrated lighting in relation to the surface of the object, a better contrast is obtained.
Click here to enlarge image

null

Embossed features

However, brightfield lighting is not recommended for plastic parts with embossed extruded features such as markings due to such light reflections. Although darkfield alignment with a vision sensor at a tilted angle to the object’s surface provides better results, the optimum solution is to frontally align the sensor with flat incidental, lateral light from an external light source. The darkfield variation with lateral incidence of light from an external light source provides much better contrast and thus increases the detection reliability of the embossed structures, which brightfield lighting cannot guarantee due to the reflective background (see Fig. 2).

FIGURE 2. Although darkfield alignment with a vision sensor at a tilted angle to the object’s surface provides better results, the optimum solution is to frontally align the sensor with flat incidental, lateral light from an external light source.
Click here to enlarge image

When detecting strongly reflective metal surfaces, brightfield lighting is often an advantage since metal surfaces clearly stand out even from a white background due to internal light reflection within the part (see Fig. 3). Thus, errors from a part with a dark background cannot occur and a high level of reliability is achieved. As the effect of total internal reflection depends strongly on the surface and angle of alignment, the stability of both these factors must be considered when using brightfield lighting.

FIGURE 3. When detecting strongly reflective metal surfaces, brightfield lighting is often an advantage since metal surfaces clearly stand out even from a white background due to internal light reflection within the part.
Click here to enlarge image

Special applications demand special lighting conditions—for example, when the effects of shadows on symmetrical round parts must be avoided. In such cases, darkfield illumination with an external ringlight is recommended. If there is a risk of reflection and over-illumination, for example, in the detection or reading of code on curved surfaces, diffuse light from an external dome or tunnel light can be used. By using a ringlight, the contour of a round part such as a toothed wheel becomes clearly visible and eliminated any shadows. Different object details can be highlighted according to the angle of incidence of the light, which can be adjusted by varying the lighting distance.

Diffuse illumination

To reliably detect features such as markings on cylindrical, strongly reflective metal parts, the use of diffuse dome or tunnel lighting is indispensable. Such illumination is useful when inspecting randomly and dispersively formed plastic film and aluminium foil such as medicine blister packs. With this type of lighting, light is not directed but penetrates evenly from all directions, eliminating strong reflections.

With transmitted light, the outer contours or profile of a part are particularly accentuated. However, structures present on the part are not visible.

When detecting embossed or recessed structures on transparent object—such as a laser-etched Data Matrix code on a glass panel—double contours can arise due to reflections from the front and rear of the glass. The sensor should therefore always be positioned vertically to the surface while external light illuminates the side of the part. Either surface or ringlights can be used in such applications.

Lighting intensity can be compensated for by altering the exposure time and gain of the system sensor or camera. Short shutter times, which require very bright light, reduce any effects of fluctuations in ambient light and also eliminate any motion blur that may occur.

To avoid any possible medical hazards to operators, non-visible infrared strobe lighting can be deployed. Such illumination methods can also be used for highlighting or eliminating certain colors or other surface characteristics of the part.

Adding color

By using colored lighting or color filters, certain features of parts can be highlighted or rendered invisible. For example, a black marking appears with maximum contrast on a red plastic part when a monochrome sensor with red lighting is used. This is because the red background reflects a large amount of light and appears very bright while the black marking hardly reflects any light.

However, if green lighting is used on the same part, the contrast between the red background and black marking virtually disappears. This is because the red plastic background reflects almost none of the complementary color green and the black marking no longer stands out from the background, which now also appears as almost black. The black marking characteristic is thus eliminated. By combining red lighting with a red bandpass filter fitted in front of the sensor, interfering effects of ambient light can also be largely eliminated.

As these examples show, the choice of the right type of lighting depends strongly on the application and thus each application requires specialized lighting. If a satisfactory result cannot be achieved with the integrated lighting built into some vision sensors, the direction of detection and lighting must be disassociated using external lighting. Surface lights, ringlights, and transmitted lights are available as alternatives with white, colored, or infrared light sources. By varying the measurement distance, angle of detection, and lighting angle, a suitable solution can be found for almost every measurement task.

Claude Kuhnen is with SensoPart, Gottenheim, Germany; www.sensopart.de.

Voice Your Opinion

To join the conversation, and become an exclusive member of Vision Systems Design, create an account today!