When it comes to machine vision projects, the importance of lighting and optics cannot be understated. Around 80% of the success of your project will depend on getting these two aspects right and mitigating related environmental factors. Here is a brief overview of some of the most important considerations when choosing lighting and optics for your next machine vision.
The purpose of lighting in machine vision is to:
• enhance the contrast of features we are interested in inspecting
• suppress the contrast of everything that is not important, and
• minimize external influences.
A well-stocked machine vision lab will have several different types of lights, multiple different LED emitting wavelengths, and optical filters. When a Vision System Engineer tests out different LED lights in the lab on the product, they attempt to enhance the visibility and quality of "features" on the product. This can be things like the readability of text on the surface, the presence/absence of an edge, the brightness of a component when it is present, etc.
Lighting techniques like a bright field, dark field, and diffuse illumination can produce very different results. Advanced Illumination has an excellent white paper, "A Practical Guide to Machine Vision Lighting," that provides examples of various lighting techniques. Different lighting strategies, angles, and distances from the product to the light are done to enhance the contrast of inspection features. The better the contrast, the more robust a system will be.
The main driver behind time spent in the machine vision lab testing different LED lighting is to later create a set of rules that determine a good product versus a bad or non-conforming product. Off-the-shelf industrial machine vision toolkits like Cognex VisionPro or MvTec Halcon allow for the rapid prototyping of scripts that can validate the lighting and inspection strategy.
The system's optical design is equally important in robust machine vision system design. Optical system design in industrial machine vision attempts to maximize the sharpness and contrast of an image within the constraints of:
• how quickly the part is moving in production,
• how consistent is the product presented to the camera,
• how much of the surface needs to be in focus, and
• how much room is available for the system on the production floor.
When architecting the optical system, a Vision System Engineer reviews the required resolution, field of view (FOV), depth of field (DOF), object-to-camera lens distance and cross-references the required F/# (related to the len's aperture size) on a Modulation Transfer Function (MTF) chart. In general, the aperture setting of a lens should be as large as possible while maintaining DOF over the required range. The larger the aperture, the greater the amount of light that can enter the lens, resulting in a higher contrast image on the sensor.
The diameter of the lens, the number of lens elements, the quality of the glass, and other factors impact the MTF performance of a lens. A lens from two different series or manufacturers but of the same focal length and aperture setting can have very different performance on its smallest resolvable spot that can be imaged onto a sensor; which is why reviewing a len's MTF chart during the design process is an important step to ensure a robust machine vision system.
After all the calculations and careful selection of lights, cameras, and lenses, when it comes to collecting images from the lab, the quality on the production floor may not be the same. A defensive plan for impacts on image quality is essential. Not all glare, uneven illumination, motion blur, optical distortions, or ambient lighting can be overcome in software with magical filters or cutting-edge algorithms.
It is better to light it right than to write around it!
How to play defense in an industrial environment? Well, a few strategies are... Glare can be minimized with filters and strategically placed baffles or flock paper. Combining more than one LED light or having a flat field correction algorithm on the camera's DSP can mitigate uneven lighting. Running calculations of the exposure time necessary to create a "stop time" image and overdriving the LED lighting with a strobe controller can eliminate motion blur.
Understand the fundamentals of illumination techniques in an industrial environment, the math and trade-offs in optical system design, and how to mitigate common issues that can impact image quality. With careful planning and execution, your machine vision project can be a success and robust.