Coupons
Help
  • FAQ
    browse most common questions
  • Live Chat
    talk with our online service
  • Email
    contact your dedicated sales:
0

Contour Lighting in Machine Vision: Methods and Implementation

April 27, 2026


 

Introduction

Machine vision applications that require precise detection and measurement of edges and small defects often need challenging illumination arrangements. To maximize contrast between important image details and the background, a technique called occlusion lighting can be used. When combined with a high-quality telecentric imaging lens, occlusion lighting reduces scattering effects that may appear with other illumination methods, enabling more accurate edge detection and improved overall image contrast. Four types of illuminators can produce contour illumination: traditional backlight, masked backlight, collimated backlight, and telecentric illuminator. Each has different advantages and limitations that should be weighed according to the application.

 

Divergence and Numerical Aperture

Before reviewing different types of occlusion illuminators, it is necessary to consider the divergence of the light source and the numerical aperture (NA) of the imaging lens. The divergence of a source is the angle at which rays propagate relative to the optical axis. A divergent source is one whose illumination profile expands as it moves away from its origin, similar to a standard flashlight. If a source does not appear to expand as it moves forward, it is defined as a collimated source, the most common example being a laser.

Collimation occurs when the rays from a source propagate in parallel. This can be achieved by using optical elements to manipulate a divergent beam, or by placing a divergent source sufficiently far from the target so that it appears collimated when it reaches the object. Positioning a divergent source at the focal point of a positive lens produces collimated rays after refraction. The source size and the chosen lens focal length determine how well the beam is collimated. Equation 1 relates residual divergence θ, source diameter D, and collimating lens focal length f. That expression ignores other factors that may affect beam quality, such as lens shape factor, figure errors, or surface roughness. The equation illustrates the trade-off frequently required between induced divergence and light collection. Figure 1 outlines a simple collimation arrangement and shows how the beam diameter after collimation equals the diameter of the collimating lens.

45f14d72-df3e-11ee-a297-92fbcf53809c.png

Collimation of a divergent source

Figure 1: Collimation of a divergent source

The smaller the source divergence, the more suitable the source is for occlusion lighting. Figure 2 shows how collimated and divergent sources interact differently with the inspected object.

Divergent source versus collimated source

Figure 2: Divergent source versus collimated source

Rays from a divergent source strike object edges at many angles, producing light scattering (Figure 3). The scattered light depends on the part geometry and material properties, such as surface smoothness and reflectivity. This can create the effect that scattered rays appear to originate within the physical boundary of the part itself. Rays from a collimated source illuminate the object more directly, greatly reducing scattering and producing a sharper edge between background and contour.

Light scattered from an object's edge

Figure 3: Light scattered from an object's edge

When selecting a lens and illumination source for an imaging system, numerical aperture is a key consideration. The lens NA is a dimensionless number describing its ability to collect off-axis light. Equation 2 shows that a source NA is defined by its divergence θ.

46222d16-df3e-11ee-a297-92fbcf53809c.png

The imaging lens NA may be provided as part of the lens specification, or estimated from the reciprocal of its F-number (Equation 3). Because they are directly related, NA can also be used to define lens resolution and depth of field.

462a3704-df3e-11ee-a297-92fbcf53809c.png

To maximize system efficiency, the imaging lens NA and the source NA should be as closely matched as possible. If the source NA is much larger than the lens can accept, scattering and stray-light problems may occur. If the lens NA is much larger than the source NA, the image can appear dim and lack sufficient contrast. Telecentric lenses are commonly used as imaging lenses in occlusion illumination setups. Telecentric lenses maintain constant magnification when the object is moved closer or farther, making them well suited for measurements of defect shape and size. Compared with standard fixed-focus imaging lenses, telecentric lenses typically have smaller NAs, making the choice of illumination more critical.

 

Traditional Backlight

A traditional backlight is a divergent source placed behind the inspected object. These are often constructed by placing many small emitters, such as LEDs or randomly oriented optical fibers, behind a diffuser to create a source suitable for lower-precision occlusion imaging. They are commonly used where precise edge detection is not required, such as in microscopy or for non-reflective objects. Advantages include relatively low cost, wide availability, compact size, and easy integration into space-constrained systems.

Because these backlights integrate a divergent source with a diffuser, the resulting light typically scatters around the object edge. This effect can be especially pronounced for reflective metallic objects, as shown in Figure 5.

Object contour using a conventional backlight

Figure 5: Object contour using a conventional backlight

Such scattering appears as a gradient and blur at the edge, which can make it difficult for operators or software to determine the true edge location. Heavy scattering may also illuminate unwanted portions of the object and lead to misleading data. The edge contour in Figure 6 shows a transition from bright to dark across roughly 30 pixels, with text on the side of the lens producing ripples in the data.

 

Masked Backlight

If the scattered light from a conventional divergent backlight is unacceptable, increasing the distance between the backlight and the object will make the backlight appear less divergent. However, this is not always optimal because moving the backlight too far away can cause excessive light loss. If the backlight is too close, the inherent divergence and scattering remain problematic.

Traditional backlight compared with masked backlight

Figure 6: Traditional backlight compared with masked backlight

Masked backlighting uses an opaque material, such as flock paper, to block unwanted portions of the backlight. This approach is advantageous because it is a quick, low-cost modification. The downside is that the mask cannot completely eliminate edge scattering and may require re-masking for different object sizes. Objects that move within the lens field of view are also not effectively masked. Figure 8 compares a masked backlight with an unmasked backlight.

Object edge using conventional backlight (left) and masked backlight (right)

Figure 7: Object edge using conventional backlight (left) and masked backlight (right)

 

Collimated Backlight

Similar in construction to a traditional backlight, a collimated backlight contains a divergent source and diffuser but includes an additional collimating film to reduce backlight divergence. This thin film transmits only rays within a certain angular range, forming a source with lower divergence and a sharper contour. The integrated film provides the low-edge-scatter benefit without requiring physical masking for different object sizes.

Collimated LED backlight for advanced edge illumination

Figure 8: Collimated LED backlight for advanced edge illumination

Although these backlights are not truly collimated, the improvement is evident in occlusion setups. Figure 10 shows an example with reduced edge scattering and sharper contour edges.

Collimated LED backlight for edge illumination

Figure 9: Collimated LED backlight for edge illumination

Reviewing the edge intensity profile confirms the cleaner edge appearance. 

Collimated backlights are a practical choice when edge scattering is a concern but space and budget constraints do not permit a telecentric illuminator.

 

Telecentric Illuminators

For high-precision applications that require the most accurate measurements, consider a telecentric illuminator as the light source. A telecentric illuminator operates on a similar principle to a telecentric imaging lens, but instead of projecting an aperture stop to infinity with the front optical elements, it projects the source. When used together, a telecentric illuminator and a telecentric imaging lens deliver superior performance and contrast compared with the backlight options described earlier.

The primary advantage of telecentric illuminators is their high degree of collimation achieved through optical design. Divergent LED sources are integrated into the assembly to produce near-parallel rays, often within less than one degree of true collimation. Telecentric illuminators are typically constructed by precisely positioning a large positive lens and a small, powerful LED to create a lighting profile that produces clear contours and better matches the NA of telecentric imaging lenses. 

Object contour using a telecentric backlight

Figure 10: Object contour using a telecentric backlight

Edge contour captured with a telecentric illuminator

Figure 11: Edge contour captured with a telecentric illuminator

These high-contrast contours come with trade-offs. Telecentric illuminators are typically more expensive and much larger than the previously discussed backlights. Due to telecentric lens design, the size of the front element determines the illuminated spot size. Large fields of view require large telecentric illuminators, increasing system size and weight. Additionally, the source's low NA that reduces scattering also makes alignment more critical. If the telecentric illuminator and lens are misaligned beyond a certain tolerance, the illuminated spot will appear dim and edge contrast will decrease rapidly. Figure 11 illustrates how quickly contours degrade when the lens and illuminator are misaligned.

Illuminated spot when aligned (left) and misaligned by 20 arcminutes (right)

Figure 11: Illuminated spot when aligned (left) and misaligned by 20 arcminutes (right)

Manufacturer specifications for telecentric illuminators can sometimes be confusing. When used with a telecentric imaging lens, the lens working distance is a meaningful specification because it describes the physical distance range over which the lens can focus correctly. A telecentric illuminator does not focus rays or create an image, so the working distance figure is often irrelevant. More applicable specifications for telecentric illuminators are maximum collimated beam diameter, physical size of the illuminator optics, and numerical aperture. Those specifications provide a basis for selecting a compatible illuminator and lens combination.

 

Conclusion

Figure 16 compares the same object's edge contour across different illuminators, expressed as the number of pixels over which the transition between bright background and dark edge occurs. The telecentric illuminator exhibits the fastest and most consistent cut-off, while the collimated backlight shows a similar slope that occurs over roughly twice the number of pixels. The profile from the traditional backlight initially resembles the collimated backlight but additional scattering from the highly divergent backlight prevents the contour from reaching darker intensities quickly. The inconsistency in the traditional backlight profile is caused by text on the object edge that becomes visible only because of the higher edge scattering, highlighting another potential issue when using conventional backlights.

Related Tags


2026 AIVON.COM All Rights Reserved
Intellectual Property Rights | Terms of Service | Privacy Policy | Refund Policy