Machine vision performance depends on more than camera resolution, lens quality and illumination intensity. The wavelengths reaching the sensor can have a significant effect on whether a feature is clearly distinguishable from its surroundings.
A camera may receive light from the controlled illumination used by the inspection system, ambient factory lighting, daylight and reflections from surrounding surfaces. The object itself can also reflect and absorb different wavelengths in different ways. All of this optical information reaches a sensor whose sensitivity varies across the spectrum.
Optical filters allow this spectral information to be controlled before it reaches the camera.
By transmitting wavelengths that contain useful image information while attenuating wavelengths that do not, a filter can increase contrast, reduce the influence of ambient illumination and make particular materials or features easier to distinguish.
The appropriate filter therefore depends on the relationship between the illumination source, the object being inspected and the spectral response of the camera sensor.
Why Are Optical Filters Used in Machine Vision?
A machine vision camera does not automatically distinguish between light that is useful to the inspection and light that is not.
If a system illuminates a component using a particular wavelength, the camera can still receive radiation from other sources. Depending on the environment, this may include overhead lighting, neighbouring machinery, daylight or other illumination used elsewhere in the production process.
This unwanted light can alter image intensity and reduce the consistency of the inspection.
An optical filter positioned in front of the camera can restrict the wavelengths reaching the sensor. Where the controlled illumination occupies a defined spectral region, the filter can transmit that region while rejecting a substantial proportion of the surrounding spectrum.
Filtering can also be used for a different purpose: selecting the wavelength region in which the feature being inspected provides the greatest contrast.
These two functions are closely related but not identical. One aims primarily to suppress unwanted illumination, while the other uses the spectral behaviour of the object itself to improve the information available to the camera.
Matching the Optical Filter to the Illumination Source
Controlled illumination is fundamental to many machine vision systems because it reduces variation in how the object is presented to the camera.
Spectral filtering can make that control more effective.
Consider a system using narrow-band LED illumination. The camera needs to detect light from the LED after it has interacted with the object, but it does not necessarily need the rest of the visible spectrum.
A bandpass filter can be selected with a transmission region corresponding to the useful illumination wavelength. Light within that region reaches the sensor, while wavelengths outside it are attenuated.
This can substantially reduce the contribution from broadband ambient illumination.
The filter should not, however, be selected from the nominal LED wavelength alone.
LED output has a spectral distribution rather than consisting of one exact wavelength. If the filter passband is too narrow, positioned incorrectly or shifts under the operating geometry of the system, some of the useful illumination may also be rejected.
The source spectrum and filter transmission therefore need to be considered together.
Reducing the Effect of Ambient Light
Ambient illumination can be particularly problematic where a machine vision system operates in an environment that cannot be completely optically isolated.
Daylight is an obvious example because its intensity can change substantially with time and environmental conditions. Artificial lighting can also introduce spectral components that compete with the controlled machine vision illumination.
Without filtering, these changes can alter the signal reaching the camera even though nothing about the inspected object has changed.
A suitable optical filter can reduce the spectral range over which this unwanted light reaches the detector.
For example, if a system uses controlled red illumination, a corresponding bandpass filter can transmit the required red wavelengths while attenuating much of the broadband visible light elsewhere in the spectrum.
The effectiveness of this approach depends on the spectral separation between the controlled illumination and the unwanted light.
A filter cannot distinguish between two sources emitting at the same wavelength. It can only distinguish according to spectral content. Illumination design and filtering therefore need to be considered as parts of the same optical system.
Improving Contrast Between Features and Materials
Optical filtering is not only about removing ambient light.
It can also exploit differences in the spectral behaviour of the objects being inspected.
Two materials may have similar brightness or colour under broadband illumination but reflect a particular wavelength very differently. Selecting that wavelength can increase the difference in intensity recorded by the camera.
This principle can be useful when distinguishing materials, identifying coatings, detecting printed features or increasing the visibility of a feature against its background.
The best wavelength is application-dependent.
A filter that produces excellent contrast for one combination of materials may provide little benefit for another. The useful spectral region depends on how the target and background reflect, transmit or absorb the illumination.
Where spectral behaviour is not already known, comparing the target and background across different wavelengths can help identify where the strongest useful contrast occurs.
The objective is not simply to maximise the amount of light reaching the camera. It is to maximise the optical difference that allows the inspection system to distinguish the required feature reliably.
Visible and Near-Infrared Machine Vision
Machine vision systems are not restricted to wavelengths visible to the human eye.
Many camera sensors retain sensitivity into the near-infrared, depending on the detector technology and camera construction. This can allow imaging systems to observe spectral differences that are not apparent in a conventional colour image.
A material that appears similar to another in the visible spectrum may reflect or absorb near-infrared radiation differently.
Near-infrared illumination and appropriate filtering can therefore reveal contrast that would otherwise be difficult to obtain.
This does not mean that near-infrared imaging is inherently better than visible imaging. Its usefulness depends on the spectral characteristics of the target, background and sensor.
Where the relevant contrast occurs within the visible spectrum, visible illumination may provide the better solution. Where useful differences occur beyond it, near-infrared imaging can provide an additional source of information.
The wavelength should therefore be selected according to the inspection requirement rather than according to whether it is visible or infrared.
Bandpass Filters in Machine Vision
Bandpass filters are widely applicable to machine vision because they allow a defined wavelength region to reach the camera while attenuating wavelengths on either side.
They are particularly useful when the system uses controlled narrow-band illumination.
The centre wavelength establishes the approximate position of the transmission band, while the bandwidth determines how much of the surrounding spectrum is also transmitted.
A narrower bandwidth can provide greater spectral discrimination, but narrower is not automatically better.
The passband still needs to accommodate the useful source spectrum and any spectral changes caused by the operating conditions of the filter.
If the transmission band is unnecessarily broad, more unwanted light can reach the sensor. If it is unnecessarily narrow, useful illumination may be lost and the system can become more sensitive to wavelength tolerances, temperature or angle of incidence.
Bandwidth should therefore be chosen according to the spectral separation required by the actual imaging system.
Longpass and Shortpass Filters in Machine Vision
Not every machine vision application requires a narrow bandpass.
A longpass filter transmits wavelengths longer than a defined spectral edge while attenuating shorter wavelengths. A shortpass filter performs the opposite function.
These filters can be useful where the required information occupies a relatively broad wavelength region and the unwanted radiation lies predominantly on one side of it.
A longpass filter might, for example, be used where near-infrared information is required while shorter visible wavelengths need to be suppressed.
Shortpass filtering can be appropriate where useful visible or shorter-wavelength information needs to be separated from longer-wavelength radiation.
The decision between bandpass, longpass and shortpass filtering should be based on the spectral regions that need to reach the detector and those that need to be rejected, rather than on the filter terminology itself.
The Camera Sensor Matters
A filter should not be selected without considering the spectral sensitivity of the camera.
The detector determines which wavelengths can contribute to the recorded image. Radiation that falls outside its sensitivity range may have little practical significance, whereas unwanted wavelengths within a region of high sensitivity can make a substantial contribution to the signal.
This has important consequences for blocking specifications.
It is possible to specify strong blocking across an extremely broad wavelength range, but this may provide no practical improvement if the camera has negligible response throughout much of that region.
Conversely, blocking that appears adequate when considering only the illumination wavelength may be insufficient if the sensor remains sensitive to strong unwanted radiation elsewhere in the spectrum.
The useful system response is therefore determined by the combination of:
illumination spectrum → object response → filter transmission → detector sensitivity

Considering these elements together provides a much better basis for filter selection than treating the filter as an isolated component.
Angle of Incidence and Machine Vision Filters
Angle of incidence can affect the spectral behaviour of interference filters.
At normal incidence, light reaches the filter approximately perpendicular to its surface. As the incidence angle increases, spectral features within an interference filter generally shift towards shorter wavelengths.
This can be important in machine vision systems where the filter is intentionally mounted at an angle or where the optical geometry produces a range of incidence angles.
A narrow bandpass filter is particularly sensitive to this consideration because a shift in the passband can reduce overlap with the illumination spectrum.
The effect also becomes relevant in wide-angle imaging systems. Rays passing through different parts of the optical system may encounter the filter at different angles, potentially producing variation in spectral response across the field.
Filter specifications should therefore reflect the geometry in which the component will actually operate rather than assuming that performance measured at normal incidence will remain unchanged in every imaging configuration.
Transmission and Blocking
High transmission is valuable because it allows more of the useful optical signal to reach the camera, but transmission alone does not determine whether a machine vision filter will improve the image.
Blocking can be equally important.
If the required illumination is relatively weak compared with unwanted ambient light, even a filter with excellent passband transmission may perform poorly if significant unwanted radiation continues to reach the sensor.
The required balance depends on the relative strength of the useful and unwanted signals and the sensitivity of the detector across those wavelength regions.
This is why optical density should be specified across a defined blocking range rather than treated as a single isolated value.
The aim is to provide sufficient rejection where unwanted radiation could influence the measurement while maintaining the transmission needed within the useful spectral region.
Choosing an Optical Filter for a Machine Vision System
The starting point should be the inspection itself.
What feature needs to be detected, and what optical difference allows the camera to distinguish it from the surrounding material?
Once that is understood, the illumination spectrum can be selected or assessed according to the wavelengths that provide useful contrast.
The camera response then establishes how effectively those wavelengths can be detected and which other spectral regions could contribute unwanted signal.
The filter sits between these elements.
Its transmission band needs to preserve the useful optical information, while its blocking regions need to suppress wavelengths capable of reducing contrast or introducing variability.
The optical geometry must then be considered, particularly where interference filters operate away from normal incidence or within wide-angle imaging systems.
Environmental conditions can introduce additional requirements where the system operates across significant temperature ranges or in industrial environments that place mechanical or durability demands on the optical component.
The result is a filter specification developed around the complete imaging chain rather than around wavelength alone.
When Is a Custom Machine Vision Filter Required?
Standard optical filters can be suitable where their spectral and physical characteristics correspond closely to the requirements of the imaging system.
A custom filter becomes relevant where those characteristics do not provide the necessary performance.
The illumination wavelength may require a different centre wavelength or bandwidth. Blocking may need to extend across a particular portion of the camera response. The system may operate at an angle that requires the spectral design to account for wavelength shift, or the filter may need non-standard dimensions to integrate with the optical assembly.
Customisation can also be appropriate where several requirements need to be balanced simultaneously, such as high transmission through the useful wavelength region, strong rejection of ambient light and controlled performance across a defined angular range.
The requirement should still originate from the imaging system rather than from a desire to make every filter parameter as demanding as possible.
A well-defined custom specification identifies the spectral and physical characteristics that genuinely influence inspection performance and allows the filter to be designed around them.
Brinell Vision develops precision optical filters for imaging and optical systems where wavelength, bandwidth, transmission, blocking and physical requirements need to be matched to the application.
Machine Vision Filters as Part of the Optical System
Optical filters can make a substantial difference to machine vision performance, but they do not operate independently of the rest of the system.
The illumination determines which wavelengths are available. The target determines how those wavelengths are reflected, transmitted or absorbed. The filter determines which portions of that optical information reach the camera, and the detector determines how strongly they are recorded.
A change to any one of these elements can alter the effectiveness of the others.
For this reason, the most useful question is rarely simply “Which optical filter should I use?”
The better question is “Which wavelengths contain the information this inspection needs, and which wavelengths should be prevented from reaching the detector?”
Once that is established, filter type, wavelength, bandwidth, transmission, blocking and angular performance can be specified around the actual machine vision requirement.
Optical Filters for Machine Vision – FAQs
What does an optical filter do in a machine vision system?
An optical filter controls the wavelengths reaching the camera sensor. It can transmit wavelengths associated with the controlled illumination or useful image information while attenuating ambient light and other spectral regions that could reduce contrast or measurement consistency.
Can an optical filter improve machine vision contrast?
Yes, where the target and background have different spectral responses. Selecting a wavelength region in which their reflectance, transmission or absorption differs can increase the intensity difference recorded by the camera and make the required feature easier to distinguish.
Which optical filter is best for LED illumination?
There is no single filter suitable for every LED source. A bandpass filter is often useful with narrow-band LED illumination, but its centre wavelength and bandwidth should be selected from the actual LED spectrum, camera response and operating geometry rather than the nominal LED wavelength alone.
Why are near-infrared filters used in machine vision?
Near-infrared filtering can allow a camera to detect spectral differences between materials or features that are difficult to distinguish using visible light. Its usefulness depends on the target, background, illumination and spectral sensitivity of the camera.
Should an optical filter be matched to the camera or the illumination?
Both need to be considered. The filter needs to transmit the useful illumination after it has interacted with the target, but its blocking regions should also account for wavelengths to which the camera remains sensitive. The target’s spectral response is the third important part of the relationship.
Does filter bandwidth affect machine vision performance?
Yes. A narrower passband can reject more unwanted light but must remain wide enough to transmit the useful illumination under the actual operating conditions. An unnecessarily narrow filter can reduce signal and increase sensitivity to wavelength shifts and tolerances.
Can optical filters reduce the effect of ambient light?
Yes, when the controlled illumination can be separated spectrally from the ambient light. A suitable filter can attenuate wavelengths outside the required illumination region, reducing their contribution to the camera signal. It cannot, however, distinguish between controlled and ambient light occurring at the same wavelength.