Introduction
Lighting is a key component of machine vision systems. This document helps explain key concepts to consider when choosing lighting for your application.
The learning objectives of this article are as follows:
- Overview of lighting and reflection basics.
- Description of Lux (the unit for measuring brightness).
- Choosing the shape of a light source.
- The different methods available for lighting, as well as their advantages, and, disadvantages.
- When and why to add filters to a lighting system.
- Types of cameras and the wavelengths used to image a target.
- Optimizing lighting setup with strobe features.
Table of Contents
Light reflection
There are two types of light reflection: specular and diffuse. The surface properties of the object to be imaged determines which of these reflection types will be most prevalent. Smooth/polished surfaces will reflect specular light, this may cause unwanted glare and bright spots that can obscure details. Matte/rough surfaces will reflect diffuse light; this can cause features to be blurry and noisy which presents difficulties when taking accurate measurements.
Specular reflection
Occurs when light reflects off a on a smooth/polished surface. The angle of incident light is equal to that of the reflected light.
Diffuse reflection
Occurs when light reflects off a rough or matte surface and scatters in many directions, rather than reflecting at a single angle.


Light measurement
Three units are commonly talked about when determining how to measure light: Candela, Lumen, and Lux. A more detailed look at these values and how they are derived is available in the appendix.
When selecting a light source, the most common measurement to consider is how many lux the light source puts out.
Lux
Lux is a measurement of luminous intensity with respect to surface area. One lux is equal to one lumen/m2.
This value is an important consideration when selecting a light source. When measuring in lux the greater the distance between the light source and the surface (target object to be illuminated) the less it is illuminated.
In the example below, Objects A and B are the same size and surface area. Object A is farther away from the light source, and we see that the luminous intensity is lower as there is only one ray (red arrow) illuminating it. Conversely, Object B is closer to the light source and receives more luminous intensity, illustrated by the three rays illuminating it.
The key take away here is that lux changes with distance from the light source. When evaluating a light source, the datasheet will tell you how many lux you can expect at a given distance; e.g., 70,000 Lux at a distance of 75mm).

Object A is farther away from the light source, and we see that the luminous intensity it receives is lower compared to the equally sized Object B as illustrated by the rays (red arrows) illuminating it.
Light types
Lighting comes in different shapes and sizes. The three main types are as follows:
- Bar Light: A rectangular bar that is good at overhead or angled lighting to bring up surface imperfections on the target.
- Ring Light: A circular ring of light that is usually placed directly above the target. This format is useful as the lens and camera setup can be placed inside the hole in the ring light, allowing the camera to get closer to the target.
- Backlight: A plate placed behind the object to be illuminated; backlights are discussed further below.

Image of bar light (left), square ring light (center), circular ring light (right)
Lighting methods
Depending on the application, the camera, and the surface of the target object, you may need to illuminate your target object using one of these techniques described below.
Here is a rough guide to selecting a lighting technique which we will discuss in detail below:
| Target Object Type | Lighting Type |
|---|---|
| All Objects except shiny/polished | Bright Field |
| Shiny/Polished Materials | Dark Field |
| Edge Detection Dimensional | Dark Field/Coaxial |
Bright field
In bright field illumination a light source is placed directly above (90°) the object. Partial bright field can be achieved by lowering the angle of the light source between 90° and 45° to the target object.
Advantages
Good at generating more contrast and enhancing surface features
Disadvantages
When imaging reflective objects light can cause hotspots, making features like engravings, scratches and defects difficult to detect

Dark field
A light source is directed at the object at low angles (below 45°), creating high contrast and revealing fine details without overwhelming the camera with direct illumination. In the below diagram, an example is given of a ring light being used for dark field illumination.
Advantages
Enhances contrast for features that scatter light while leaving smooth areas dark. This is ideal for inspecting polished or reflective materials.
Disadvantages
Compared to bright field, the light reflected will be less intense, this will result in a darker image. The camera may require a longer exposure time to make the image brighter. Ring lights are preferred for dark field due to their spread out and uniform illumination of the target. When using ring lights, the drawback is that in order to satisfy the low angle requirement, the light must be close to the target. This can sometimes cause the light source to appear in the image.

Backlighting
The object of interest is placed on a backlight, and the imaging system observes it in high contrast, resulting in a silhouette.
Advantages
Great for edge detection in quality control applications. The silhouette gives a high contrast for precise measurements. This method can also be employed in stress detection for transparent materials when using one a polarized camera.
Disadvantages
When using non-transparent materials this method generates a silhouette with clearly defined sharp edges. This does not provide illumination to the rest of the target that does not lie on the edge, as a result surface properties such as scratches/roughness will be darkly illuminated and hard to see.

Coaxial light
This light source only allows specular light to enter the camera lens. Light is reflected downwards (90°) by the half mirror to illuminate the target. Only specular reflected (see above description) light is able to pass back up to the camera through the half mirror. Diffuse, reflected light from the target is rejected. This in turn causes a contrast at the edge points of a target. The further the light is from the target, the greater the rejection of diffused light becomes, creating greater image contrast and definition.
Advantages
Good for finding edges on shiny surfaces as glare is reduced. Reduces shadowing.
Disadvantages
Limited working distance as the device needs to be close to target. Large lighting setup.

Spectral filters
Filters are an important part of the machine vision system. When discussing filters there are two categories, namely filters placed in front of the light source and filters paced in front of the lens of the camera.
Light source filters
Diffusion filters
These filters are made of a translucent material that scatters light. Their purpose is to spread out light in a more uniform manner. The diagram below compares a light source with and without a diffusion filter. When there is no diffusion there is an intense hotspot at the center and dimmer light radiating out. A diffusion filter changes the illumination to help reduce unwanted hotspots.

A comparison of the illumination from a light source with and without a diffusion filter.
Polarizing filters
A polarizing filter only allows light polarized in a particular direction to pass through, and blocks all other light. When using a polarizing filter in front of a light source the target is illuminated by this polarized light. A special polarized camera can then be used to analyze the reflected light. Anything on the surface of the target that disrupts the uniform reflection allows this camera to detect a change in the polarization state. This helps enhance and add contrast to changes in the angle of the surface (detect curvature) or changes in surface texture (scratches, dents, foreign objects). For more information on polarization please see our tech brief on the subject.

Lens filters
The wavelength of light is inversely proportional to its frequency. So a high frequency equates to a short wavelength and vice versa. This is denoted by the below equation:
c=f λ
c: The speed of light
λ: Wavelength
f: Frequency
Shortpass/Longpass/Bandpass filters
Filtering allows the transmission of some wavelengths and then attenuates other wavelengths. Filters are added to the end of the lens of a camera system. Filters can be subdivided into 3 categories, namely, shortpass, longpass and bandpass.
Shortpass filters allow short wavelength (high frequencies) to pass through and attenuate longer wavelengths (low frequencies).
Longpass filters are the inverse of shortpass filters. That is, they allow long wavelengths to pass through and attenuate shorter wavelengths.
Bandpass filters only allow a narrow range of wavelengths pass through and attenuate everything else.

Shortpass/Longpass/Bandpass filters
Filtering allows the transmission of some wavelengths and then attenuates other wavelengths. Filters are added to the end of the lens of a camera system. Filters can be subdivided into 3 categories, namely, shortpass, longpass and bandpass.
Shortpass filters allow short wavelength (high frequencies) to pass through and attenuate longer wavelengths (low frequencies).
Longpass filters are the inverse of shortpass filters. That is, they allow long wavelengths to pass through and attenuate shorter wavelengths.
Bandpass filters only allow a narrow range of wavelengths pass through and attenuate everything else.

Neutral density filters
Neutral Density (ND) filters reduce the amount of light entering the camera. These filters do this by either absorbing or reflecting a percentage of incoming light. What makes ND filters unique is that they reduce this light evenly for a range of wavelengths. These filters have applications when imaging intense sources of light, such as in welding.
Light spectrum
The electromagnetic spectrum is a continuous range of all possible wavelengths of electromagnetic radiation. Many cameras operate in the visible light band with wavelengths ranging from 400–700nm. There are camera solutions available for wavelengths above and below these visible light wavelengths. At the lower end of the wavelength spectrum between 10–400nm we have Ultraviolet (UV) light. Higher up in wavelength we have Near Infrared Light (NIR) (750–1000nm), and Short-wave Infrared (SWIR) (900–1700nm).

UV cameras
Shorter wavelengths of light such as UV can detect smaller details and have a finer resolution than higher wavelengths such as visible light. For this reason, UV cameras are used in applications needing precise measurement, such as those in the semiconductor industry. Another property of UV light is that it can penetrate deeper into materials. This is especially useful in identifying similar looking transparent materials such as (plastic and PET) for material sorting. For more information on UV cameras, see our product page.

SWIR cameras
The SWIR wavelength includes the visible light spectrum; this resides between 400nm to 1700nm.
Like UV cameras, SWIR cameras are useful as their absorption and reflection characteristics differ from visible light. Objects that look similar under visible light will look differently under SWIR light.
Water molecules strongly absorb light at specific wavelengths in the SWIR spectrum. Because of this, SWIR light can be used to detect moisture in fruits and vegetables. Bruising in produce can be revealed as differences in moisture levels. In the example above, normal wavelengths (left) are unable to detect any bruising but SWIR can detect bruising in the apples (right).
Another interesting property of longer wavelengths is that some objects appear translucent in SWIR light. This property is used to inspect silicon wafers in the semiconductor industry.
These cameras are used in a wide range of industrial applications, delivering greater precision in fruit inspection and sorting, packaging, IR microscopy, semiconductor inspection, material sorting and more. See our product page for more information.

SWIR fruit inspection

SWIR food inspection
Line scan cameras
Line scan cameras do not capture a frame in a single exposure like conventional area scan cameras. Instead, it creates an image frame by stitching together multiple line exposures. In these line exposures a single row of pixels scan an object continuously as it moves past the camera.
This camera type is useful for a range of high-speed applications, including the continuous inspection of paper, plastic, and metal manufacturing, as well as object motion inspection for railways or roads.

Light selection
When it comes to choosing a light here are some key considerations.
- Is there adequate ambient light on the target or does it require its own light source?
- Does the light source illuminating the target match that of the camera. Will the camera require illumination at specific wavelength? such as UV, visible light or SWIR.
- Does the project require filtering on either the light source or the lens side.
- How bright does the light source need to be? The next section discusses how the strobe output functionality of Lucid Vision’s cameras can be used to boost the maximum illumination of a light source.
- What exposure time does the camera have? Exposure time is the time the sensor is exposed to light when acquiring a frame. A short exposure time will result in less light being sampled the sensor. If an application requires a short exposure time, the target will have to be illuminated more brightly.
Strobe lighting
LED lights are limited in how much current they can dissipate without significantly impacting the lifetime of the light source. This sets an upper limit on how bright the sustained illuminance of the LED can be.
This can be an issue for some imaging such as line scanning, where we want as much lux as possible. One solution to this problem is offered by strobe lighting.
Strobe lighting enables the LED to dissipate more current (and thereby have more lux) when the duty cycle is low.
Duty cycle:


LUCID Vision Labs’ cameras offer strobe output on most of its cameras, allowing the camera to synchronize captures with a light source strobing on. This way, the capture is taken at maximum illumination. See the related App note.
Line scan lighting recommendations
The Triton2 line scan camera is capable of an exposure time of 2 μs and a line rate of 130 kHz. Given this speed and exposure time, this camera systems require more light than typical area scan cameras.
In previous sections we mentioned lux which is measured in lumens/m².
When evaluating if a light source is bright enough, we need to find the luminous exposure H. This is derived by multiplying the lux by the exposure time of the camera.
In constant lighting conditions:
H=E×Δt
With:
E = illuminance (lux = lumens/m²)
Δt = time interval (s)
With a short exposure time, Δt is small, so our E, which is the lux of our light source, must be made larger to maintain the same luminous exposure H.
Appendix
Candela
Measures the amount of light emitted in the range of a 3D angular span (Unit cd). Because luminous intensity is described with respect to an angle, the distance that you measure intensity is irrelevant. In the below diagram, we have a 2D representation with a light source and two arcs A and B. These arcs are the same angle.
The same number of light rays (Red Arrow) pass through A, and B. We say that A and B have the same luminous intensity. The angular span for candela is expressed in steradian. On the left we have a light source with a high candela value (cn), and on the right we have a light source with low candela value.

Arcs A and B always receive the same luminous intensity regardless of the distance from the light source.
Lumen
This unit is derived by multiplying the luminous intensity (in candela) by the angular span over which the light is emitted. In this diagram below, we again simplify this concept in a 2D representation. Here our light source emits light equally in all directions (i.e., it is isotropic), so the lumen value is the intensity multiplied by the angular span. In a 3D space the angular span of a sphere is 4π.

Lumen is the total amount of light emitted from a light source.
Lux
This unit is similar to candela (lumen/steradian), however instead of measuring luminous intensity with respect to an angle we are measuring luminous intensity with respect to surface area lumen/m2.
This value is an important consideration when selecting a light source. When measuring in lux the greater the distance between the light source and the surface (target object to be illuminated) the less it is illuminated.
In the example below, Objects A and B are the same size and surface area. Object A is farther away from the light source, and we see that the luminous intensity is lower as there is only one ray (red arrow) illuminating it. Conversely, Object B is closer to the light source and receives more luminous intensity, illustrated by the three rays illuminating it.
The key take away here is that lux changes with distance from the light source. When evaluating a light source, the datasheet will tell you how many lux you can expect at a given distance; e.g., 70,000 Lux at a distance of 75mm).

Object A is farther away from the light source, and we see that the luminous intensity it receives is lower compared to the equally sized Object B as illustrated by the rays (red arrows) illuminating it.