When to use optical filtering in a machine vision application

Industrial image processing is essentially a requirement in modern manufacturing. Vision solutions can deliver visual quality control, identification and positioning. While vision systems have gotten easier to install and use, there isn’t a one-size-fits-all solution. Knowing how and when you should use optical filtering in a machine vision application is a vital part of making sure your system delivers everything you need.

So when should you use optical filtering in your machine vision applications? ALWAYS. Image filtering increases contrast, usable resolution, image quality and most importantly, it dramatically reduces ambient light interference, which is the number one reason a machine vision application doesn’t work as expected.

Different applications require different types of filtering. I’ve highlighted the most common.

Bandpass Filtering

Different light spectrums will enhance or de-emphasize certain aspects of the target you are inspecting. Therefore, the first thing you want to do is select the proper color/wavelength that will give you the best contrast for your application. For example, if you are using a red area light that transmits at 617nm (Figure 1), you will want to select a filter (Figure 3) to attach to the lens (Figure 2) that passes the frequency of the area light and filters out the rest of the color spectrum. This filter technique is called Bandpass filtering reference (Figure 4).

This allows only the light from the area light to pass through while all other light is filtered out. To further illustrate the kinds of effects that can be emphasized or de-emphasized we can look at the following images of the same product but with different filters.

Another example of Bandpass filtering can be seen in (Figure 9), which demonstrates the benefit of using a filter in an application to read the LOT code and best before sell date. A blue LED light source and a blue Bandpass filter make the information readable, whereas without the filter it isn’t.

f9
Figure 9

Narrow Bandpass Filtering

Narrow bandpass filtering, shown in (Figure 10), is mostly used for laser line dimensional measurement applications, referenced in (Figure 11). This technique creates more ambient light immunity than normal Bandpass filtering. It also decreases the bandwidth of the image and creates a kind of black on white effect which is the desired outcome you want for this application.

Shortpass Filtering

Another optical filtering technique is shortpass filtering, shown in (Figure 12), which is commonly used in color camera imaging because it filters out UV and IR light sources to give you a true color image.

f12
Figure 12

Longpass Filtering

Longpass filtering, referenced in (Figure 13), is often used in IR applications where you want to suppress the visible light spectrum.

f13
Figure 13

Neutral Density Filtering

Neutral density filtering is regularly used in LED inspection. Without filtering, light coming from the LEDs completely saturates the image making it difficult, if not impossible, to do a proper inspection. Deploying neutral density filtering acts like sunglasses for your camera. In short, it reduces the amount of full spectrum light the camera sees.

Polarization Filtering

Polarization filtering is best to use when you have surfaces that are highly reflective or shiny. Polarization filtering can be deployed to reduce glare on your target. You can clearly see the benefits of this in (Figure 14).

f14
Figure 14

How to Select the Best Lighting Techniques for Your Machine Vision Application

The key to deploying a robust machine vision application in a factory automation setting is ensuring that you create the necessary environment for a stable image.  The three areas you must focus on to ensure image stability are: lighting, lensing and material handling.  For this blog, I will focus on the seven main lighting techniques that are used in machine vision applications.

On-Axis Ring Lighting

On-axis ring lighting is the most common type of lighting because in many cases it is integrated on the camera and available as one part number. When using this type of lighting you almost always want to be a few degrees off perpendicular (Image 1A).  If you are perpendicular to the object you will get hot spots in the image (Image 1B), which is not desirable. When the camera with its ring light is tilted slightly off perpendicular you achieve the desired image (Image 1C).

Off-Axes Bright Field Lighting

Off-axes bright field lighting works by having a separate LED source mounted at about 15 degrees off perpendicular and having the camera mounted perpendicular to the surface (Image 2A). This lighting technique works best on mostly flat surfaces. The main surface or field will be bright, and the holes or indentations will be dark (Image 2B).

Dark Field Lighting

Dark field lighting is required to be very close to the part, usually within an inch. The mounting angle of the dark field LEDs needs to be at least 45 degrees or more to create the desired effect (Image 3A).  In short, it has the opposite effect of Bright Field lighting, meaning the surface or field is dark and the indentations or bumps will be much brighter (Image 3B).

Back Lighting

Back lighting works by having the camera pointed directly at the back light in a perpendicular mount.  The object you are inspecting is positioned in between the camera and the back light (Image 4A).  This lighting technique is the most robust that you can use because it creates a black target on a white background (Image 4B).

Diffused Dome Lighting

Diffused dome lighting, aka the salad bowl light, works by having a hole at the top of the salad bowl where the camera is mounted and the LEDs are mounted down at the rim of the salad bowl, pointing straight up which causes the light to reflect off of the curved surface of the salad bowl and it creates very uniform reflection (Image 5A).  Diffused dome lighting is used when the object you are inspecting is curved or non-uniform (Image 5B). After applying this lighting technique to an uneven surface or texture, hotspots and other sharp details are deemphasized, and it creates a sort of matte finish to the image (Image 5C).

Diffused On-Axis Lighting

Diffused on-axis lighting, or DOAL, works by having a LED light source pointed at a beam splitter and the reflected light is then parallel with the direction that the camera is mounted (Image 6A).  DOAL lighting should only be used on flat surfaces where you are trying to diminish very shiny parts of the surface to create a uniformed image.  Applications like DVD, CD, or silicon wafer inspection are some of the most common uses for this type of lighting.

6A
Image 6A

 

Structured Laser Line Lighting

Structured laser line lighting works by projecting a laser line onto a three-dimensional object (Image 7A), resulting in an image that gives you information on the height of the object.  Depending on the mounting angle of the camera and laser line transmitter, the resulting laser line shift will be larger or smaller as you change the angle of the devices (Image 7B).  When there is no object the laser line will be flat (Image 7C).

Real Life Applications 

The images below, (Image 8A) and (Image 8B) were used for an application that requires the pins of a connector to be counted. As you can see, the bright field lighting on the left does not produce a clear image but the dark field lighting on the right does.

This next example (Image 9A) and (Image 9B) was for an application that requires a bar code to be read through a cellophane wrapper.  The unclear image (Image 9A) was acquired by using an on-axis ring light, while the use of dome lighting (Image 9B) resulted in a clear, easy-to-read image of the bar code.

This example (Image 10A), (Image 10B) and (Image 10C) highlights different lighting techniques on the same object. In the (Image 10A) image, backlighting is being used to measure the smaller hole diameter.  In image (Image 10B) dome lighting is being used for inspecting the taper of the upper hole in reference to the lower hole.  In (Image 10C) dark field lighting is being used to do optical character recognition “OCR” on the object.  Each of these could be viewed as a positive or negative depending on what you are trying to accomplish.