You have probably heard, and perhaps experienced, that lighting is a big challenge in applying machine vision and a vital key to its successful application. You have most likely read about the wide range of available lighting techniques and sources for you to use. Even so, you still question how to pick the right lighting technique for your application. This three-part series gives you an approach to help you efficiently achieve that goal.

Let’s briefly review the important characteristics of good illumination for a machine vision application.

  • It creates a high contrast image.
  • It provides adequate exposure for the camera.
  • It helps minimize noise from the scene and from the environment.
  • It is rugged and reliable for all variations in the scene.

There are three lighting parameters you can control:

  • Direction
  • Spectrum or color
  • Intensity
  • Polarization

This first of three articles starts where your application starts with understanding how light interacts with objects in the scene. The second article covers the range of light sources commonly used in machine vision and the conditions under which they work well. This is the direction component of engineered lighting. Finally, the third article discusses spectrum, color, polarization and related topics in lighting that will help you optimize the contrast your lighting produces.

As stated, part one of this three-part article starts where the application begins: with the scene – the object and background.


The Scene

Understanding how light interacts with the scene is the important first step in designing machine vision illumination. The scene consists of one or more objects and the background. It may also contain artifacts that are undesirable in your image, such as the texture of a conveyor belt transporting a part, and should have low contrast if at all possible.

Because of space limitations, this article only considers a single object and its background. Extending the technique to cover multiple parts or to cover unwanted features will be evident.

There are cases where you want to image a feature on a part, say a 2D code on a package. In that case, the object is the 2D code itself and the background is that part of the package surrounding the code. For this example, the background behind the package is irrelevant.


Characterizing The Scene

We divide the parts of a scene, the object and the background that affect contrast into three areas:

  • Shape
  • Surface
  • Optical properties

Each of these three characteristics is further subdivided. Occasionally, an application will have a characteristic that is not covered by one of the presented subdivisions. It is straightforward to recognize and record the unique characteristic.

There are five general categories of shape:

  • Flat
  • Curved (like a cylinder)
  • Domed (like the top of a ball)
  • Height variations
  • Slope variations

Flat is the easiest to illuminate uniformly. Curved objects tend to have glare unless the lighting is carefully designed to avoid glare. Domed parts are the most difficult to illuminate; they will produce glare from almost any illumination direction. Only dome lights can be expected to light domed parts uniformly.

When there are height or slope variations, lighting can be designed to produce shadows or shading if that is what is wanted. Otherwise, a very diffuse source is needed to provide uniform illumination.

There are two categories of surface texture:

  • Smooth
  • Rough

A smooth texture is one that, even if it has texture, the texture will not be resolved by the vision system and will not contribute to gray-scale or color deviations across the surface. Otherwise, the surface is rough; that is, the texture does or can show up in the image.

Rough textures can be isotropic, that is, the image will show the same texture quality regardless of the illumination direction. For example, sandpaper is isotropic. On some occasions, such as a machined part with machine tool marks resolvable on the surface, the texture is anisotropic. That is, its appearance in the image will change with a change in illumination direction.

The next three categories refer to optical properties and are further subdivided:

  • Reflection
  • Transmission
  • Emission

Reflection is an optical property that is common to all materials, even black materials. Except for surfaces designed to be optically black (non-reflective) all surfaces, even black ones, reflect some light. Reflection can be broken into three categories:

  • Specular
  • Diffuse
  • Semi-diffuse

Specular surfaces are smooth and polished. They reflect light like a mirror. Diffuse surfaces scatter light over a very broad range of angles; there is no glare from the surface. Semi-diffuse surfaces scatter light over a narrow range of angles, and while illumination will not produce glare, it can produce hot spots. In addition, reflection often has a color associated with it such as appearing green because the object reflects green light better than other wavelengths of light.

Transmission is the ability of a material to let light pass through it. Transmission can be divided into the following categories:

  • Opaque
  • Direct
  • Translucent

Many objects are opaque, the do not transmit any light. Some objects exhibit direct transmission; that is, they are transparent. Light rays pass through the transparent object, and while they may change direction, they are not scattered. Translucent objects transmit light, but the light rays are scattered as they pass through the object. Again, transmission has a color component. Clear objects pass all wavelengths of light whereas a red object, for example, transmits only red wavelengths of light.

scene characteristics form

Figure 1 – Scene Characteristics Form.

Finally, emission refers to the object producing its own light. The options are:

  • None
  • Radiant
  • Fluorescent

Most objects do not emit any useable light energy. Some objects, such as a display on a cell phone or hot, glowing metal radiate their own light. In this category, fluorescence is also included. Fluorescence occurs when an object illuminated with one wavelength of light, usually ultraviolet, emits light energy at a different, longer, wavelength. When considering objects that emit light, characterizing the emitted spectrum is essential.

One way to record the information is with a form such as shown in Figure 1. Using this form, identify the characteristics of the object and the background. You can note each characteristic with a checkmark or, if warranted, a brief description such as for the color.

To be able to create contrast, there must be something different about the object and background. Identifying the difference, or differences, enables you to identify the light source that will create contrast.

metal bracket on black background

Figure 2 – Metal Bracket on Black Background.


Figure 2 shows a metal bracket on a black background. The bracket can be characterized as flat, rough (due to what appear to be resolvable surface scratches) and isotropic (although individual scratches appear different depending on the light direction the randomness of scratches gives the part a texture that is generally light direction insensitive), semi-diffuse (it is not mirror-like, but can still have hot spots from the illumination) and isotropic (reflectivity does not depend on the light direction) with a white color, opaque, and no emission. The background can be characterized as flat, rough (due to its resolvable texture) and isotropic (since it does not have a preferred direction), diffuse and isotropic with a dark (black) color, opaque, and no emission.

scene characteristics

Figure 3 – Scene Characteristics.

Figure 3 shows how the form might be filled out for this scene. Obviously, similar characteristics cannot be used to create high contrast. The differences in this example are a) the reflection that is diffuse for the background and semi-diffuse for the bracket, and b) the color difference between the bracket and the background.

Since it is not desirable to resolve the texture, the selected lighting method will need to suppress texture rather than make it distinct.

Semi-diffuse surfaces are prone to hot spots as they reflect the light. Hot spots are almost always undesirable.

Since both the object and the background are opaque, backlighting is ruled out. That leaves front lighting as the preferred technique.

For front lighting, the illumination “W” (see Figure 4) differentiates between bright field and dark field lighting. Light within the “W” is bright field, and light outside the “W” is dark field.

Figure 4 – Illumination “W”

Figure 4 – Illumination “W”

Diffuse surfaces and, to a lesser extent, semi-diffuse surfaces will reflect some dark-field light into the camera. It would be possible to use dark field front lighting except that this lighting would highlight the texture of both the part and the background.

Bright field front lighting from a directed source, such as a ring light or coaxial illumination will produce a hot spot on the semi-diffuse part. So, a diffuse light source such as a dome or a flat dome will work. Since flat dome lights (see Figure 5) are less expensive and give a greater clearance to the part, the flat dome would be the choice for this application.

flat dome light

Figure 5 – Flat Dome Light (Courtesy of Metaphase Technology)

An Excel file of the Scene Characterization Form is available HERE