Lighting
Vision & Sensors
V&S
H2 Deck By Bold Name
h2 xxxxxx
H1 xxxxxx
h2 xxxxx
Selecting a light source from a vast range of types, sizes, and colors is challenging even for the most experienced machine vision practitioner. By Perry C. West
Why Machine Vision Lighting is So Hard And What You Can Do About It
“Put a camera here.”
I commonly hear this from people who design manufacturing equipment. They have the system designed mechanically and maybe even partially built. That’s the beginning of the lighting challenge. For most applications, the light source costs more than the industrial camera and its lens. (Smart cameras change the economics.) Also, the light source usually takes up more space than the camera and lens.
The person developing the vision system usually has a background in mechanical engineering, software engineering, controls, or some other technical discipline but not in optics. Selecting a light source from a vast range of types, sizes, and colors is challenging even for the most experienced machine vision practitioner.
What do we require from the light?
- It must create good contrast. Contrast is the signal for imaging processing.
- It must provide robust illumination to generate consistent contrast with all expected scene variations.
- Ideally it helps suppress unwanted features by making them low in contrast to help simplify image processing.
- It needs to help suppress the interference from ambient light.
- It must supply sufficient light energy for the camera to have good exposure.
- It must be reliable; not failing or degrading prematurely.
- The illumination on the scene must be uniform to reduce the burden on image processing.
- It must contribute little to no noise in the imaging.
- It may have to minimize blur when imaging moving objects.
- It addresses environmental and human factors.
- It must fit within the available space.
Of all these criteria, good, consistent contrast is the most important. Having contrast vary unpredictably leads to more complex programming that may never be adequate. Do convolutional neural nets, or deep learning, reduce the need for repeatable contrast? Not really. Deep learning can adapt to changes in lighting if the training set is expanded and balanced. A balanced training set has roughly equal numbers of examples for every case. The effort expended to compile the expanded training set and the increased training time with more training images is costly. Then, with deep learning, there is never certainty in how the network performs with an image different in contrast than any in the training set. So, even with deep learning, high and consistent contrast is necessary for a highly reliable vision application.
We ask a lot of our light source. Fortunately, with LED lights designed for machine vision illumination, many of these requirements are implicit in their designs. Still, there are six degrees of variability, or dimensions, in lighting design in addition to the criteria listed above:
- Front lighting or back lighting
- Bright field or dark field lighting
- The range of light distribution from directed through diffuse
- Color
- Intensity (light power)
- Polarization
This article looks at the first three dimensions addressing the direction of the light.
Figure 2. Illumination "V" Showing Bright Field and Dark Field
Figure 1. Illumination "W" Showing Bright Field and Dark Field
First a few definitions:
- Front lighting: the light source is on the same side of the scene as the camera.
- Back lighting: the light source is on the opposite side of the scene from the camera.
- Bright field: the light source is located within the illumination “W” for front lighting (see Figure 1) or the illumination “V” for back lighting (see Figure 2).
- Dark field: the light source is located outside the illumination “W” for front lighting or the illumination “V” for back lighting.
- Directed: light rays reaching any point on the scene come from one direction and cast distinct shadows.
- Diffuse: light rays reaching any point on the scene come from a wide range of angles or directions and cast indistinct or no shadows.
Figure 4. Lighting Cube Simplified
Figure 3. Lighting Cube
The three dimensions: front lighting/back lighting, bright field/dark field, and directed/diffuse are all descriptions of the direction the illumination takes to reach the scene. They can be considered three axes of a cube – the Lighting Cube shown in Figure 3.
While there is a continuum of variation between directed and diffuse illumination as well as between bright field and dark field illumination, the same is not true of front lighting and back lighting which are virtually distinct. This separation allows the cube to be reduced to two squares – one square for front lighting and one for backlighting as shown in Figure 4.
While bright field lighting can overlap into dark field lighting, the reverse is not true. Dark field lighting never intrudes into bright field lighting space. It follows that dark field lighting can never be highly diffuse or some of its light would come from the front lighting area. The lower right corners of the two parts of the lighting cube are not realizable.
Figure 6. Ring Light Mapped onto Lighting Cube
Figure 5. Available Light Sources
Available light sources (see Figure 5) map well onto the lighting cube and cover all of its area.
A couple of examples illustrate this mapping.
The first is for the ring light shown in Figure 6. The ring light can be used for front lighting as either bright field or dark field. Ring lights are designed with LEDs aimed for either of these uses. Ring lights can also be used for dark field back lighting but not for bright field lighting.
Another example is the diffuse back light mapped onto the lighting cube as shown in Figure 7. This light is used exclusively for back lighting and is very diffuse. Yes, the diffuse back light can be used as a flood light for front lighting, but it is very inefficient when compared to lights designed as flood lights.
Figure 8. Light Sources Mapped onto the Lighting Cube
Figure 7. Diffuse Back Light Mapped onto Lighting Cube
Figure 8 shows twelve of the most common machine vision light sources and how they map onto the lighting cube.
So far, the discussion only covered light sources. Picking the correct light source depends on what scene characteristics are available to create contrast. To help with the identification, use a scene analysis form similar to the one shown in Figure 9.
Notice the form is divided into two sections: Physical Properties and Optical Properties. The physical properties, or shape, determine how the illumination “W” or “V” is distorted. The classical “W” and V” assume flat surfaces.
Figure 10. Bright Field REgion for Flat Diffuse Surface
Figure 9. Scene Analysis Form
The optical properties affect how crisp the illumination “W” and “V” are. If the surface is specular for reflectance or transparent, the “W” or “V” has its classical shape shown in Figure 1 and Figure 2. However, as the surface tends toward diffuse reflectance or translucence, light rays are scattered and the arms of the “W” and “V” become less distinct. Figure 10 shows bright field for a diffuse flat surface. Note there is no effective dark field region for lighting.
The third sub-section under optical properties on the scene analysis form covers emission: either parts that emit light or parts that fluoresce.
We can work through an example to see how to engineer machine vision lighting. The example is this blue card with a gold sticker on it shown in Figure 11. The scene analysis form is shown in Figure 12.
Figure 12. Scene Analysis Form for Example
Figure 11. Example Part
What is important between the object (sticker) and the background (card) are only the differences. The two differences are the nature of reflectance – specular and diffuse – and the color – gold and blue. These are the properties circled on the form and available to create contrast.
Figure 14. Example with Blue Dark Field Illumination
Figure 13. Color Wheel
Gold contrasts well with blue since yellow is actually white minus the blue wavelengths. (See the color wheel in Figure 13.)
A good question to ask when creating contrast, “Is there a preference whether the object is light or dark against a contrasting background?” The example allows the use color or light direction or, preferably for best reliability, both.
It is usually easier to make specular surfaces dark than light. The dome light and flat dome light can make the surfaces bright in the image. Dark field lighting leaves specular surfaces dark. Diffuse surfaces scatter both bright field and dark field illumination, and can appear bright with either illumination method.
For the example, dark field light leaves the blue diffuse surface bright and the shiny gold sticker dark. Using blue illumination helps achieve even higher and more reliable contrast. The result is shown in Figure 14 using high-angle dark field illumination with blue light.
This article lists the requirements for good lighting. Leading the list is good, dependable contrast. It introduced the lighting cube representing the three components of light direction that can be used to create contrast. It also introduced the scene analysis form to help people new to machine vision identify characteristics of the scene useful to create contrast. The scene analysis form also serves to document the lighting design decisions. The article also touched briefly on using color to create contrast.
Some final remarks:
- Not all components can be represented by the scene analysis form. For example, surfaces having an iridescence create unique challenges for illumination and contrast.
- However you engineer your lighting approach, you must test it carefully. Sometimes even the most experienced lighting experts learn from the test and adopt a different lighting approach.
The next time you are asked to, “Put a camera here.” you’ll be better prepared to also advocate for space for the lighting and expedite the design of lighting to give high, reliable contrast.
References:
- xxxxxxxxx
xxxxxx - xxxxxxxxx
xxxxxxx
Opening Image Source: santafejewelry / iStock / Getty Images Plus via Getty Images.
Remaing Images Source: Automated Vision Systems Inc.
Perry C. West is president of Automated Vision Systems Inc. (San Jose, CA). For more information, call (408) 267-1746, e-mail perry@autovis.com or visit www.autovis.com.
READ MORE FROM THE AUTHOR: