The Importance of Illumination for Machine Vision
Welcome to the next series of machine vision blogs from ClearView Imaging. Over the next four blog posts, we will be examining the role of illumination within machine vision systems, and why lighting should never be overlooked, but instead regarded as a key component of any successful vision system.
Whether you’re interested in building your own machine vision system for a project, a commercial application, or are just interested in learning more about illumination for machine vision, this blog post is for you.
Ultimately, illumination is fundamental for all machine vision applications, and this list of course includes printing and packaging, robotics, industrial automation, medicine, life sciences, and the automotive industry, just to name a few. We hope you enjoy reading.
Machine Vision Lighting
For further information on contrast and image quality within the
- Optical Parameters Part 1
- Optical Parameters Part 2
- MTF Charts and Curves
- Aberrations & Distortion
- Choosing the Right Lens for Your Application
Illumination is absolutely key when it comes to good image quality. With all machine vision applications, we want well-lit environments so that objects can repeatably be imaged with clearly defined details and edges, with a high enough contrast ratio to detect what we want to detect.
The main takeaway here is that you could have the best cameras, lenses, PC, software and image pre-processing algorithms, but none of this would be a substitute for well-planned and appropriate illumination to pick out key details. Good illumination makes just about everything else in the process a whole lot easier.
Unfortunately it isn’t as simple as just pointing a light in the same direction as your camera – there are many factors to consider before you decide on a lighting setup for your system, and there will always be an optimal type of lighting for your application.
Let’s run through some basic topics around machine vision illumination.
Grey Scales in Digital Images
A digital image can be described as a one or two-dimensional combination of pixels. Each of these pixels has its own location (X/Y) and intensity.
In monochrome imaging, this intensity is typically defined in grey scales, which range from 0-255.
A range of grey scales, 0-255.
Contrast can be described as the disparity between these grey scale values – 0 being dark, 255 being light. Let’s look at how these values apply to machine vision processing.
Contrast in Pattern Matching & Geometric Model Finder
In Matrox Imaging Library X, there are two functions used to recognise patterns and objects in digital images.
The first of these is called Pattern Matching, and it is based on normalised greyscale correlation (NGC), a classic machine vision technique that finds a pattern by looking for a similar spatial distribution of intensity.
While it is a proven method of recognition, normalised greyscale correlation can struggle in poorly or dynamically lit environments, so it’s important to choose a lighting setup that will produce repeatable image quality with good contrast levels.
Geometric Model Finder
The Geometric Model Finder tool, on the other hand, uses geometric features (e.g., contours) to find an object. The tool quickly and reliably finds multiple models – including multiple occurrences – that are translated, rotated, and/or scaled with sub-pixel accuracy.
GMF locates an object that is partially missing and continues to perform when a scene is subject to uneven changes in illumination, thus relaxing lighting requirements.
Visible Light Spectrum & Spectral Range
When we talk about visible light, we are referring to a range in the light spectrum that is visible to the human eye, between 380-780 nanometers (nm). This is known as a spectral range.
Spectral range is very important when considering lighting for your machine vision project. In simple terms, the colour of light depends on its wavelength, and different wavelengths will have different properties when used with varying materials and environments.
Characterising Light for Vision
There a range of properties that light can adopt when interacting with objects. Here are the three main types:
Diffusion is essentially the dispersion of light through a medium.
Consider how diffusion varies when light disperses through a textured piece of glass compared with a regular window.
Are there surfaces in your vision system that would make light diffuse undesirably? Could a diffused lighting setup allow for better contrast in your image.
Remember, without light bouncing off of an object, we cannot see it (unless it is a source of light itself). This means we are almost always relying on reflection from a light source to produce a good image; this being said, it’s also important to keep in mind the reflectivity of the object we expect to capture, and the types of lighting that will aid or hinder image quality.
Without the sun as a light source, we would struggle to see the moon.
Refraction is the way rays of light appear to ‘bend’ through media based on their wavelength. Longer wavelengths will refract less than shorter wavelengths, so orange or red light will appear to bend less than blue or violet light.
The last illumination property in this list is diffraction, which is where light appears to bend around objects. This isn’t common in machine vision contexts though, so it isn’t essential to keep in mind.
Machine Vision Illumination & Lighting Solutions from ClearView Imaging
That’s it for our introduction to illumination for machine vision. Be sure to check out our great range of machine vision lights over in our products section!
Be sure to stay tuned next week as we explore the different types of machine vision lighting!
Here at ClearView, we have a broad range of knowledge and machine vision expertise to help you decide on the right solution for your project.
We offer a huge range of components, and our experts are happy to help no matter what your question or problem may be. Feel free to get in touch with us and one of our machine vision experts will be ready to help you get going with your project!