How to use a Bandpass Filter

The Bandpass Filter Selection Process and Application:

Bandpass Filter is a device which passes frequencies within a certain range (band) and filters out frequencies outside of the given range (band). In machine vision terms, a Bandpass Filter is generally used to maximize contrast between features of an image.

As most machine vision cameras are monochrome, we will use a monochrome camera in this application. Monochrome cameras assign each pixel a intensity score of 0 to 255. Monochrome cameras are popular because they are usually cheaper, require less processing power, and therefore can image faster. Monochrome vision tools also tend to usually more robust than vision color tools as well.

0-255 Grayscale Pixel Range

As seen in the figure above, a pixel intensity value of 0 is black (absence of light) and a pixel intensity of 255 is white (presence of light).

Another important concept to understand is the color spectrum, we will focus on the visible color spectrum.

Visible Light Spectrum

The color of visible light depends on its wavelength. Each color has a different wavelength. Red has the longest wavelength, and violet has the shortest wavelength. When all the waves are seen together, they make white light.

The Relationship Between Light Colors and Wavelength

As we can see in the image above, different wavelengths correlate to a different color of visible light. For our purposes, we will focus on the main wavelengths of light available from machine vision light suppliers like Smart Vision Lights

 Smart Vision Lights Available Light Colors
Color Name Wavelength Visible
Ultraviolet (UV) 365nm Outside Spectrum
Ultraviolet (UV) 395nm Outside Spectrum
Blue 470nm Visible Spectrum
Cyan 505nm Visible Spectrum
Green 530nm Visible Spectrum
Red 625nm Visible Spectrum
White Multiple Visible Spectrum
Infrared (IR) 850nm Outside Spectrum
Infrared (IR) 940nm Outside Spectrum

Lets imagine we are using a Monochrome Camera and are trying to pick out any components that are not the correct color (in this case we want to find components that are not red). We will also assume we are using a white light, which is comprised of all wavelengths of visible light.

First, lets look at an original image of the products we will be working with (This is taken with a color camera, although we will be working with a monochrome camera for this application).

Original Color Image for Bandpass Filtering
We can see that the lower center product is blue and therefore we want to be able to generate high contrast between the blue and red colored components.
Lets gate a baseline monochrome image to see what we are working with. 
Product before MidOpt BP660 Bandpass Filter is applied
Here we can se that there is not much intensity difference between the blue product and the red products. To increase contrast, we will want to make the red products appear white (Pixel Intensity closer to 255) and products of other colors to appear dark (Pixel Intensity Closer to 0). This is where filter selection comes into play.
We want to select a bandpass filter that correlates with the color of the object we want to appear bright
For Red to appear bright, we want to choose a filter that passes red light and blocks out colors that are not red. This is where it comes in handy to look at the wavelength of red light. Looking at our charts from earlier in the article, we see that red light has a wavelength of approximately 665nm. As a result we will begin by looking at the closest bandpass filter to 665nm.
The various bandpass filters are available here
We can see that the closest bandpass filters available are the following three:
MidOpt Bandpass Filter Red Color Options
We will start by looking at the BP660 filter since 660nm is the closest to the 665nm we have determined we want to pass (you will have to trust your eyes here, 635 is a light red and 665 is a dark red, the product we are looking at is more of a darker red than a lighter red). The next step we will take is to verify that the filter passes the wavelength we are interested in. To do this we will want to look at the transmission data, This is available in the product datasheet.
The product datasheet of the BP660 can be found on the product page
MidOpt BP660 Transmission Data
The first thing we want to verify is that we have high transmission of the color we want to appear bright. We can see at a wavelength of 665nm we will have somewhere between 96.53% (at 660nm) and 96.75% (at 670nm).
The next thing we need to verify is that the transmission of the color we want to block out will have low transmission. We want to block out a darker blue here, so we will look up the wavelength of a darker blue. We see that blue has a wavelength of approximately 470nm (with darker blue being a bit lower). When we look at the transmission of wavelengths around 470nm, we see that they all transmit 0%, so we can be confident that blue items will appear dark.
Now lets apply our bandpass filter to the camera system and capture a new image
Image after MidOpt BP660 Filter is applied
We can see that we have much improved image contrast! This will make it much simpler for our inspection system to determine if a non red component was accidentally mixed in with our red components!
Below we can see all three images side by side for comparison:
MidOpt BP660 Bandpass Filter Results

 

We have successfully selected a bandpass filter to help improve our image contrast! 

Please note: This article assumes the application is utilizing a white light. This application would also see success if used with a light that is the same color as the features we want to appear bright. For example if you are trying to make red items appear bright, then use a white light or a red light and a filter that passes the red light. If you wanted to do the opposite and make blue appear to be bright, then you could use a white or blue light with a 470nm bandpass filter.

If you still require assistance choosing a bandpass filter, feel free to contact our tech support team at (331) 684-7466 or Support@MachineVisionDirect.com

Empty content. Please select category to preview