Practical Guide to Machine Vision Lighting

27, Nov. 2024

 

Practical Guide to Machine Vision Lighting

Polarization

Unlike microscopy applications, light polarization in machine vision has been employed primarily to block specular glare reflections from surfaces that would otherwise preclude a successful feature identification and inspection. Normally, two pieces of linear polarizing film, applied in pairs with one placed between the light and object (polarizer) and the other placed between the object and camera (analyzer ' Fig. 58a). It is common for the polarizer to be affixed to the source light and the analyzer to be mounted in a filter ring and affixed to the camera lens via screw threads or a slip fit mechanism if no threads are present, allowing the analyzer to be freely rotated.

If you are looking for more details, kindly visit Getian.

However, it's first important to comprehend the nature of unpolarized light passing through space and its behavior with respect to this polarizer/analyzer pair. As indicated earlier, light is a propagating transverse electromagnetic wave, meaning the electric field fluctuations, modeled and depicted as a sine wave, 'oscillate' in random planes perpendicular to the light propagation direction ' exhibiting unpolarized behavior (Fig. 58b). Further, the wave magnitude is related to the amount (or intensity) of light.

Fig. 58

Relative optical path positions of the polarizer and analyzer in, a ' Front-lighting arrangement, b ' Light oscillation planes through a linear polarizer and resulting single wave oscillation.

In the following graphics, for clarity of demonstration, we illustrate only 2 perpendicular oscillating light waves to demonstrate how they respond to polarization.

Typical iodine-acetate based linear polarization film is composed of roughly parallel lines of long-chain polymers (Fig. 59). This structure allows us to define a Polarization Axis (Transmission for an analyzer) and an Absorption Axis, oriented at right angles to each other. In looking at the film on a molecular level with respect to the perpendicular light wave fronts (Fig. 60), we see that it is these parallel strands of polymer chains that block (absorb) all but one plane of oscillation.

Fig. 59

Idealized polarizer demonstrating the transmission / polarization axis (blue), absorption axis (red) and partial transmission axis, oriented at 45 degrees to the polarizer (black).

Fig. 60

Molecular view of two perpendicular light waves interacting with the long-chain iodine complex molecules. Note that the wave oscillation in the horizontal plane (red dashed line) is effectively absorbed by the polymer chains, whereas the perpendicular wave will pass through the chains.

However, it is important to note that the film's long-chain polymers are oriented perpendicular, rather than parallel to the transmission and absorption axes ' unlike the picket-fence analogy commonly depicted in the literature, which can be misleading if interpreted literally. This analogy is not incorrect as long as we only analogize the 'pickets' in a fence with a light polarization or transmission axis and not a physical grate of chains, oriented parallel to the wave amplitudes. What is most important to understand is that the long-chain molecules absorb the electric field oscillation component whose amplitude is parallel to the polymer chains but passes the perpendicular component more readily.

To understand how unpolarized and polarized light are affected when they pass through a succession of polarizing films, we look to Malus' Law. Briefly stated ' the intensity of plane polarized light that passes through an analyzer varies as the square of the cosine of the angle between the polarizer polarization axis and analyzer transmission axis. We can then infer that the plane polarized light is fully or partially transmitted or blocked completely (Figs. 61a-b).

The mathematical relationship is described by the following equation:

I = I0cos2 Θ, where:

I0 = Original pre-analyzer light intensity

I = Post-analyzer light intensity

Θ = Angular difference between the polarizer polarization & analyzer transmission axes

For example, a simple calculation applying basic trigonometry: if the polarizer and analyzer transmission axes are parallel (Θ = 0 degrees), cosine of 0 = 1, meaning the plane polarized light passes 100% through, whereas if Θ = 90 degrees, cosine of 90 = 0, that plane polarized light is 0% transmitted. Finally, if Θ = 45 degrees, we would be correct in our supposition that ½ of the plane polarized light is transmitted.  We see the relationship between light oscillation planes and respective transmission and absorption axes in Fig 61c.

Another important aspect of plane polarized light is that its intensity is ½ that of the original unpolarized light incident on the first polarizer. This is of importance to vision users if the application is already starved for light ' any use of a single or especially a pair or more of polarizers may produce a considerable loss of image intensity. We will describe and illustrate these points in the following sections.

Fig. 61

a ' Unpolarized light vibrating in the horizontal plane (depicted in blue) passing through the polarizer (P) and blocked (absorbed) by analyzer A1, b ' Light passing through the same initial path as that in diagram a, but through analyzer A1 and A2 (rotated @ 45 degrees, blocking some of the plane polarized light. Note the light radiant power drops considerably with each P or A pass-through (if not blocked), c ' Relative orientation of the transmission, absorption and partial transmission axes with respect to the long-chain polymers in the polarizer film.

As stated earlier, machine vision techniques have utilized light polarizer/analyzer pairs primarily to block reflective glare from parts ' this glare reflection may be caused by the dedicated lighting used in the inspection and/or from ambient sources. These two cases may be treated differently:  Nonmetallic and transparent surfaces tend to partially polarize ambient incident unpolarized light, preferentially polarizing it in the horizontal plane (or more accurately in the plane parallel to the incident surface and perpendicular to the incident light plane), and hence only an analyzer, whose transmission axis is oriented at 90 degrees is needed to block it. This process is known as reflection polarization. An example of this phenomenon is reflected glare from a road or other smooth surface, such as a lake.

However, polarization by reflection isn't always as complete as using film because photons with other oscillation directions can also be reflected, if not refracted by the part surface. This phenomenon of partial polarization explains why when rotating sunglasses (or turning your head while wearing them), the scene can get a bit brighter or darker, but not go to extinction ' it all can't be dialed out with an analyzer (vertically oriented transmission axis in this case). Metallic surfaces, on the other hand, typically reflect most, if not all the incident unpolarized light (no refraction into the material), so different strategies are often needed when it is not practical to polarize the ambient light before it is incident on a part's surface.

However, dedicated light applied to the inspection area usually can be first polarized, then the offending light reflecting off the parts into the camera can be similarly dialed out using the analyzer. The very effective use of light polarization demonstrated by the image pairs in Figs. 62a-b does come with inherent compromises, however. Most notably, in this instance, the lens aperture had to be opened 2 ½ f-stops to create the same scene intensity, for example. Therefore, there is a lot less light to work with in those application situations requiring a considerable amount of light intensity, such as hi-speed inspections.

In Figs. 62c-e, we see that glare reflected from a curved surface, such as this personal care product bottle, can be controlled, but not eliminated with polarization (Fig.62d ' center area). This is true because there are multiple reflection directions produced on the curved surface from a directional light source, and polarization filters cannot block all vibration directions simultaneously, thus always leaving some areas washed out.

In this case, a more effective approach to glare control, given the flexibility to do so, is to reconsider the lighting geometry. By simply moving the light from a coaxial position around the lens to a relatively high angle, but off-axis position, we can eliminate all specular reflection created by our light source (Fig. 62e).  Both of these application examples point toward the advantage of investigating an alternative to polarization by changing the part ' light ' camera 3-D spatial relationships.

Fig. 62

A change in 'lighting ' object ' camera' geometry or type may be more effective than applying polarizers to stop glare,  a ' Coaxial Ring Light w/o Polarizers,  b ' Coaxial Ring Light w/ Polarizers (note:  2 ½ f-stop opening),  c ' Coaxial Ring Light w/o Polarizers,  d ' Coaxial Ring Light w/ Polarizers (note some residual glare), e ' Off-axis (light optic axis parallel to the object long axis).

Another use of light polarization is illustrated in Fig. 63, namely for detecting stress-induced structural lattice damage in otherwise transparent, but birefringent materials, typically plastics. Recall that plane polarized light has wave oscillations in only one plane, unlike unpolarized light. When plane polarized light is transmitted through a stress-induced birefringent material, it resolves into two principal stress directions, each with a different refractive index, and thus the two component waves are said to be out of phase. They then destructively and constructively interfere, creating the alternating dark and light bands we see illustrated in Fig. 63b.

Fig. 63

Transparent plastic 6-pack can holder, a ' With a red back light, b ' Same, except for the addition of a polarizer pair, showing stress fields in the polymer.

Polarization References for further reading:

https://courses.lumenlearning.com/physics/chapter/27-8-polarization/

 

https://www.physicsclassroom.com/class/light/Lesson-1/Polarization

A Practical Guide to Machine Vision Lighting

With respect to the lighting environment, there are two aspects to evaluate when determining the optimal lighting solution: (1) immediate inspection environment and (2) sample/light interaction

Consider all the information from these evaluations together with the available optics, lighting types, techniques, and the four cornerstones to develop a sample-appropriate lighting solution that meets the three acceptance criteria.

 

Are you interested in learning more about IR LEDs for Machine Vision? Contact us today to secure an expert consultation!

Immediate Inspection Environment

Fully understanding the immediate inspection area's physical requirements and limitations, in a 3D space, is critical. In particular, depending on the specific inspection requirements, the use of robotic pick-and-place machines or pre-existing, but necessary, support structures, may severely limit the choice of effective lighting solutions by forcing a compromise in not only the type of lighting but also its geometry, working distance, intensity, and pattern. For example, you may determine that a diffuse light source is required but cannot be applied because of limited close-up, top-down access. Inspection on high-speed lines may require intense continuous light or a strobe light to freeze motion, and of course large objects present an altogether different challenge for lighting. Additionally, consistent part placement and presentation are also important, particularly depending on which features are being inspected; however, even lighting for inconsistencies in part placement and presentation can be developed, as a last resort, if fully understood.

 

Ambient Light Contribution

The presence of ambient light input can have a tremendous impact on the quality and consistency of inspections, particularly when using a multispectral source such as white light. The most common ambient contributors are overhead factory lights and sunlight, but occasionally errant vision-specific task lighting from other inspection stations or even other stations in the same workcell can have an impact.

There are three active methods for dealing with ambient light: (1) high-power strobing with short duration pulses, (2) physical enclosures, and (3) pass filters. Which method is applied is a function of many factors, most of which are discussed in some detail in later sections. High-power strobing simply overwhelms and washes out the ambient contribution, but has disadvantages in ergonomics, cost, and implementation effort, plus not all sources, such as fluorescent, can be strobed. If you cannot employ strobing, and if the application calls for using a color camera, multispectral white light is necessary for accurate color reproduction and balance. In this circumstance, a narrow wavelength pass filter is ineffective, as it will block a major portion of the white light contribution, and thus an enclosure is the best choice.

There are exceptions, however, to this general rule. For example, a 700 nm short pass filter, otherwise known as an IR blocker, is standard in color cameras because IR content can alter the color accuracy and balance, particularly of the green channel. Figure 5 illustrates how the use of a pass filter can block ambient light very effectively, particularly when the light of interest is low-yield fluorescence.

 


Figure 5. The left image shows nyloc nuts with a UV ring light, but flooded with red 660 nm 'ambient' light. The goal is to determine nylon presence/absence. Given the large ambient contribution, it is difficult to get sufficient contrast from the relatively low-yield blue fluoresced light from the sample. The right image has the same lighting, except a 510 nm short pass filter was installed on the camera lens, effectively blocking the red 'ambient' light and allowing the blue 450 nm light to pass.

 

Sample/Light Interactions

How a sample's surface interacts with task-specific and ambient light is related to many factors, including the gross surface shape, geometry, and reflectivity as well as its composition, topography, and color. Some combination of these factors determines how much light, and in what manner, is reflected to the camera, and subsequently available for acquisition, processing, and measurement. For example, a curved, specular surface, such as the bottom of a soda can (Figure 6), reflects a directional light source differently from a flat, diffuse surface such as copy paper. Similarly, a topographic surface, such as a populated PCB, reflects differently from a flat but finely textured or dimpled (Figure 7) surface, depending on the light type and geometry.

 


Figure 6. On the left, the bottom of a soda can is illuminated with a bright field ring light but shows poor contrast, uneven lighting, and specular reflections. On the right, the soda can is imaged with diffuse light, creating an even background so the code can be read.

 


Figure 7. The 2D dot peen matrix code on the left is illuminated by bright field ring light. The right is imaged with a low angle linear dark field light. A simple change in light pattern creates a more effective and robust inspection.

 

Color Analysis

Figure 8 - Color Wheel

 

Materials reflect and/or absorb various wavelengths of light differentially, an effect that is valid for both black and white and color imaging space. Like colors reflect and surfaces are brightened; conversely, opposing colors absorb and surfaces are darkened. Using a simple color wheel of warm versus cool colors (Figure 8), you can generate differential contrast between a part and its background (Figure 9), and even differentiate color parts, given a limited, known palette of colors, with a black and white camera (Figure 10).

 


Figure 9. A mail stamp imaged under (a) red light, (b) green light, (c) blue light, generating less contrast than green, (d) white light, generating less contrast than either blue or green. White light contrasts all colors, but it may be a contrast compromise.

 


Figure 10. Candy pieces are imaged under (a) white light and a color CCD camera, (b) white light and a black and white camera, (c) red light, lightening both the red and yellow and darkening the blue, (d) red and green light, yielding yellow, lightening the yellow more than the red, (e) green light, lightening the green and blue and darkening the red, (f) blue light, lightening the blue and darkening the others.

 

Sample Composition and Transmittance

Sample composition can greatly affect what happens to task lighting impinging on a part. Some plastics may transmit light only of certain wavelength ranges and are otherwise opaque; some may not transmit, but rather internally diffuse the light; and still some may absorb the light only to re-emit it at the same wavelength or at a different wavelength (fluorescence). Fluorescence labels and dyes are commonly used in inks for the printing industry as well (Figure 11).

 


Figure 11. The motor oil bottle on the left is illuminated with a red 660 nm ring light. On the right, the bottle is illuminated with a 360 nm UV fluorescent light.

 

The properties of IR light can be useful in vision inspection for a variety of reasons. First, IR light is effective at neutralizing contrast differences based on color, primarily because reflection of IR light is based more on sample composition rather than color differences. You can use this property when less contrast, normally based on color reflectance from white light, is the effect you want (see Figure 12).

 


Figure 12. On the left, the glossy paper sample is under diffuse white light. The right is under diffuse IR light.

 

IR light is considerably more effective at penetrating polymer materials than the short wavelengths, such as UV or blue, and even red in some cases (see Figure 13). Conversely, it is this lack of penetration depth that makes blue light more useful for imaging shallow surface features of black rubber compounds or laser etchings, for instance.

 


Figure 13. In the populated PCB the penetration of red is 660 nm (left image) and IR 880 nm light. Notice the better penetration of IR despite the red blooming out from the hole in the top center of the board.

 

Polarizing filters, when applied in pairs, one between the light and sample and the other between the sample and camera, and typically affixed to the lens through screw threads, are useful for detecting structural lattice damage in otherwise transparent samples (Figure 14).

 


Figure 14. On the left, a transparent plastic six-pack can holder is shown with a red back light. The right shows the same, except for the addition of a polarizer pair, showing stress fields in the polymer.

 

Particularly when used to block specular reflections on samples, any use of polarization filters comes with inherent compromises. The images depicted in Figure 15 demonstrate moderately effective and highly effective use of polarization filters specifically for blocking glare. In samples depicted in Figure 15a'c, you see that glare reflected from a curved surface, such as this personal care product bottle, can be controlled but not entirely eliminated (see Figure 15b center area). This is true because multiple reflection directions are produced on the curved surface from a directional light source, and polarization filters cannot block all vibration directions simultaneously, thus always leaving some areas vignetted. In this case, a more effective approach to glare control, given the flexibility to do so, is to reconsider the lighting geometry. By simple moving the light from a coaxial position around the lens to a relatively high angle, but off-axis position, you can completely eliminate all specular reflection. Conversely, for the relatively flat and planar jar top surface depicted in Figure 15d'e, you can largely remove the specular glare, producing a clear image for inspection. However, a caveat for using dual polarizers is that they can reduce the allowable light considerably'up to 2 ½ f-stops in the case of the jar top example, which could be detrimental for high-speed, light-starved inspections.

 


Figure 15. A change in light/sample, camera geometry, or type may be more effective than applying polarizers to stop glare. (a) Coaxial ring light without polarizers. (b) Coaxial ring light with polarizers (note some residual glare). (c) Off-axis (light axis parallel to the sample long axis) ring light without polarizers. (d) Coaxial ring light without polarizers. (e) Coaxial ring light with polarizers (note: 2 ½ f-stop opening).

 

If you want to learn more, please visit our website UV LEDs for 3D Printing.