Cameras and Accessories

How to Avoid Lighting Pitfalls in Machine Vision Applications

Experts offer practical advice on deploying lighting to create successful machine vision applications.
Aug. 11, 2023
10 min read

Proper lighting is crucial to the success of machine vision applications. Without it, images will not show enough visual information about the important features of an item.

Common machine vision applications in which illumination is part of the solution involve inspecting products for defects before they leave the manufacturing plant or reading barcodes or other alphanumeric data on products or packages as they move through the logistics pipeline.

As engineers working in imaging and vision know, designing a reliable lighting solution is not a simple proposition.

There are thousands of lighting options to choose from including those that are halogen, incandescent, fluorescent, compact-fluorescent, plasma-type, high-intensity discharge (HID), Xenon, light-emitting-diode (LED), fiber optic, and structured light.

Of these, LEDs are the most common choice for machine vision applications because they have long life spans, can be left on continuously, and come in many sizes, shapes and colors. LED lighting choices also span the visible, ultraviolet (UV), narrow-band and broad-band visible and infrared (IR) spectrum.

To choose from so many options, it is important to consider the characteristics of the object to be imaged, such as size, shape and color; the spatial relationship between the object, light and camera; and how the light is reflected or absorbed by the object and background. (Vision Systems Design offers more explanation here.)

With so much to consider, missteps abound. To get insights on how to avoid, or solve, common pitfalls in illumination planning and execution, Vision Systems Design asked experts at a handful of lighting companies to share their thoughts. We’ve included their comments here.

Failing to Address Lighting at the Beginning of the Design Process

Numerous experts agreed on the most common pitfall: Waiting until the tail end of the design process to address lighting for a machine vision application.

As Brett Thrailkill, application support and inside sales representative at Advanced Illumination (Rochester, VT, USA), explains, “Unfortunately, many users have the misconception that proper machine vision lighting doesn’t need to be considered until the end of the system design process. This often leads to cost overruns, inferior lighting, and delays in production timelines. To prevent this, we encourage all application engineers to consider lighting options early in the development process.”

Lindsey Sullivan, technical marketing manager at CCS America (Woburn, MA, USA), agrees, saying, “It is important to test and solve the application at the beginning of the design process. Once the required lighting is understood, the design of the inspection system can account for the positioning of the sample, size, working distance, color (and) geometry of the light.”

Choosing the Wrong Color Light

Light can be reflected or absorbed differently, depending on the color of the light and the object being imaged.

In general, according to Advanced Illumination, a light that is of a similar color as an object will reflect and thus brighten the object while a light on the opposite side of the color wheel will darken the object.

Sometimes the best choice is to darken the object—particularly if the goal is to read printed codes or words. By illuminating red print on a white envelope with a green light, you’ll get the clearest image of the print, Advanced Illumination says on its website.

However, brightness would be an advantage if the goal is to brighten or enhance the contrast between an object and its background, such as to detect wrapped candy on a conveyor belt.

This is why engineers choose white lights, which comprise both warm and cool colors, for many applications, and especially those involving a color camera. Colored lights are used with monochrome cameras.

David Hardy, vice president and design engineer for Spectrum Illumination (Montague, MI, USA), says that white lights also provide the most flexibility over time if a product’s color changes in a future iteration. “For example, the part under inspection is red or white, and a red light is chosen. But if a part color of green or blue is added later, it can appear quite dark as green and blue colors are somewhat opposite red on the color wheel. In this case, using a white light initially would have been better, or even an infrared light to remove the color.”

Simon Stanley, director of technology at ProPhotonix (Salem, NH, USA) also provides an example of how a customer in the medical device industry addressed the issue of color. “The customer was inspecting data matrix codes on different colored capsules. They were limited to using a high-resolution, but monochrome, Cognex In-Sight 9000 camera in line-scan mode; and a white line light and found that for some of the colored capsules, the images did not have adequate contrast.”

To solve the problem, he says ProPhotonix sold the company the RGB-White COBRA MultiSpec LED, which has individual color and intensity controls that engineers access through a graphical user interface (GUI). This allows them to “tune the light to optimize contrast across the whole grayscale image resulting in accurate image acquisition regardless of the color of the capsule.”

The line light has up to 12 different wavelength outputs, ranging from 365 nm-1650 m.

(More information from Vision Systems Design on addressing lighting challenges in medical device and pharmaceutical inspection is available here.) 

Choosing the Wrong Light for the Environment

Hardy at Spectrum says another pitfall is not considering the production environment during the lighting selection process. “We also see many customers choosing the wrong type of light for the environment. For example, using a standard backlight or dome light near a CNC (computer numerical control) machine where coolant splatters on the light and over time will wick inside causing internal corrosion and eventually failure.” When designing a machine vision application for harsh environments, choosing a light with a higher IPrating is a better option, he explains.

Hardy notes that the company’s IP68 Washdown series of LEDs is designed for these types of environments. The series includes ring lights, dome lights, spotlights and linear lights.

The most recent addition, introduced in 2018, is the Washdown Monster Dome Light, which is designed to remove glare from product images without a loss in intensity.

Failing to Account for Future Product Revisions or Production Environments

TPL Vision (Perth, Scotland, UK) Product Manager Jack McKinley says choosing flexible lighting products reduces risks to an application’s feasibility posed by unknown factors in the current or future production environment.

For example, he says TPL Vision’s customers often encounter different application conditions than what was tested in the lab. As a result, “higher brightness may be required (solved by overdrive products), different ambient conditions may need a different lighting setup, or integration may be different than anticipated. This is precisely where flexibility can be beneficial,” he says.

The company’s Modular Tiny Bar Light (M-TBAR), which is designed specifically for confined spaces such as in robotics applications, offers flexibility, the company says. The product allows users to change the beam angle with the company’s angle changers, which are micro-optic diffusers that can be used to widen the beam angle. The light also offers strobe overdrive illumination.

EFFI-FLEX2 from EFFILUX (Les Ulis, France) also offers flexibility, allowing engineers to adjust the emitting angle, uniformity, and operating mode (overdrive, adjustable strobe, and dimmable continuous mode).

“There are also a variety of other optical accessories that are easy to install on the light. This means you can get a different lighting geometry without needing to purchase a new light,” saving money and time on redesign work that can cause delays in projects, explains Mariann Kiraly, US sales manager for EFFILUX.

Underestimating the speed necessary for inline inspection in some environments also could lead to illumination challenges. Advanced Illumination updated its BL2 Backlights to increase brightness, allowing for higher throughput. The lights are also designed for scalability, expandable in 1 in increments up to 46 in in length or width. They can be operated in operated in continuous or overdrive strobe modes.

Lighting controllers also allow for flexibility, particularly in situations in which more than one lighting solution is deployed, explains Sullivan at CCS America. Some examples: multiple lights are on at once but at different intensity settings to avoid overexposing an image or multiple lights go on/off in sequence to capture multiple images. “For example, a controller can turn on a flat dome light for a bright field image, then a low-angle light for a dark field image,” she says.

CCS America’s PD4 Series lighting controller is designed for these types of situations, allowing engineers to program up to 16 steps of on/off for the lights in an application.

Overlooking the Impact of the Sensor and Lens on Illumination

Mark Kolvites, sales manager at Metaphase Lighting Technologies (Bristol, PA, USA), says, “Another pitfall is overlooking the fact that the lens and camera sensor are also part of the optical path for the captured image, which could affect the illumination implemented. For example, the wider the angle of the camera lens, the more optical distortion around the perimeter of the field of view, making the image look non-uniform, even though the light itself might be uniform.”

This is why Metaphase developed “light sources where, for example, the end of a linear bar light will be brighter at the ends compared to the middle of the light to compensate for lens image attenuation around the perimeter of the field of view,” he explains.

An example is the company’s Multispectral Exolight v2.0, which is available in versions covering up to six wavelengths including the short-wave infrared (SWIR) spectrum.

 Failing to Plan for Hard-to-Read Barcodes 

Outside the realm of inspection in manufacturing, lighting challenges abound in machine vision applications in logistics and warehousing. One example involves a portal system, which scans barcodes in automated or smart warehouses.

Reading those barcodes accurately has become increasingly complicated, requiring a creative approach to lighting. As Steve Kinney, director of training, compliance and technical solutions for Smart Vision Lights (Norton Shores, MI, USA), explains, “Today’s scanning portal must read through the clear outer packaging on individual items, through poly bags to see the item inside, through clear films placed over shipping labels for weather resistance, or even through shrink wrap holding a pallet together to read the barcodes of the boxes comprising the pallet. In these demanding instances, not only do the various films and packaging cause problems seeing the barcodes to be read, but they also have uneven glossy surfaces that make the imaging even harder.”

He suggests using polarized illumination techniques to see through layers of plastic film and reduce surface glare.

 “By using cross-polarization, a technique where a linear polarizer is placed over a light source (transmitter) and another rotating linear polarizer is attached over the camera lens (receiver), the light rays coming from the surface of the item are reduced while the part of the light energy that penetrates the surface is passed through the receiving polarizer. Since the cross-polarization effect reduces the light from the surface, glare and other specular effects from glossy plastic surfaces is reduced,” he says.

Kinney adds that lighting manufacturers have developed specialized lighting products that feature overdrive, “where the light is operated at multiples of the steady state current for short periods to create a brighter strobe. This allows the use of polarization needed to effectively work in portal systems while still having enough light for the short exposure periods required to image without motion blur at the item passes at high speed through the system.”

(More information from Vision Systems Design on illumination techniques for machine vision applications in logistics is available here.) 

An example of this type of lighting solution is the Lightgistics series from Smart Vision Lights. The lights feature Dual OverDrive, which combines SVL’s Deca OverDrive and standard OverDrive engines, allowing end users to attach polarizers while retaining light output to handle any speed.

Available in ring and linear formats, the new lights offer direct connection and control through a camera’s trigger output.

Whether an application involves reading barcodes on packages or inspecting products, these experts say they’ve described some of the most common missteps in designing and implementing illumination solutions for machine vision applications. 

About the Author

Linda Wilson

Editor in Chief

Linda Wilson joined the team at Vision Systems Design in 2022. She has more than 25 years of experience in B2B publishing and has written for numerous publications, including Modern Healthcare, InformationWeek, Computerworld, Health Data Management, and many others. Before joining VSD, she was the senior editor at Medical Laboratory Observer, a sister publication to VSD.         

Sign up for Vision Systems Design Newsletters

Voice Your Opinion!

To join the conversation, and become an exclusive member of Vision Systems Design, create an account today!