Six Design Considerations in Machine Vision Lighting

The best camera cannot recover information that the lighting did not reveal.

An interesting and counterintuitive fact is that machine vision systems inspect images, not parts. If the information needed for an inspection does not reach the camera, higher-resolution equipment and more sophisticated software cannot recover what was not captured.

Lighting determines what information reaches the image. The engineering challenge is not producing more light but selecting a lighting strategy that reveals the information the inspection requires while suppressing information that does not.

1. Surface or Silhouette?

When an object needs to be inspected, lighting the surface may not provide the information required. In some cases, the silhouette may provide critical information.

Consider the example of a machine vision system that repeatedly rejected stamped metal parts because it could not reliably determine whether a hole had been punched completely through the material. Operators could see the hole instantly. The camera struggled.

Using front lighting, the camera viewed light reflected from the surface of the part. That approach worked well for inspecting scratches, markings, color and surface texture. In this application, however, the surface wasn’t the feature that mattered.

Moving the light behind the part changed the inspection completely. Instead of analyzing reflected light, the camera inspected the silhouette created as the part interrupted the light. The edge of the hole became sharply defined, allowing the vision system to determine immediately whether the hole was present and properly formed.

Before selecting a lighting strategy, engineers should ask a simple question: Does this inspection depend on the surface of the part or the shape it creates? The answer usually determines which approach will produce the most reliable inspection.

2. What Does the Camera Need to See?

If the camera’s goal is to gain information about a surface feature rather than the silhouette, front lighting is required. This does not mean that bright, direct light is the solution. Two familiar inspection problems illustrate why the way in which light reflects off the surface of the part provides the information required.

A vision system inspecting freshly baked cookies began reporting inconsistent chocolate chip counts. The camera, lens and inspection software all performed as expected. The problem was the lighting. Shadows created by directional illumination resembled additional chocolate chips and exaggerated the cookie's surface texture. The vision system faithfully analyzed the image it received. The problem was that the image contained misleading information.

READ MORE: Basic Considerations When Commissioning a Vision System

Replacing directional lighting with diffuse illumination solved the problem. Dome diffused light scattered beams in many directions, reducing shadows and minimizing glare. The chocolate chips became easier to distinguish because the lighting emphasized the information the inspection required while suppressing information that interfered with it.

Consider the example of a manufacturer that needed to read a shallow stamped serial number on a machined component. This time, diffuse illumination became a problem. By reducing shadows, it also reduced the contrast that defined the stamped characters. Directional illumination projected light across the surface at a low angle, increasing contrast and making the shallow depressions much easier to distinguish.

Diffuse and directional illumination are not competing technologies. They reveal different information, just as different colors of light do. The correct choice depends entirely on what the vision system must detect. Engineers who begin by identifying the information the camera must distinguish are more likely to select a lighting strategy that produces reliable, repeatable inspection results.

3. Freeze Time

Some inspection problems occur because the camera cannot capture a sharp image before the product moves. As production speeds increase, lighting becomes just as important for stopping motion as it is for illuminating the part.

A packaging line that had operated reliably for months began rejecting products after the production speed increased. Neither the camera nor the software had changed. The products were simply moving faster.

The camera’s exposure time was too slow to capture a sharp image before the product moved. Increasing the amount of light reaching the part allowed the camera to use a shorter exposure time while maintaining image quality. At higher production speeds, engineers often use strobe lighting. This brief, intense pulse of light effectively freezes motion and produces a sharp image without slowing the production line.

Stopping motion introduces its own tradeoffs. Strobe lighting requires precise synchronization between the camera and the light source. Higher light output can increase heat and affect component life. The goal is not simply to produce a brighter image but a sharper one under real operating conditions.

Before replacing the camera or changing the inspection software, engineers should ask a different question: Is the vision system failing to see the product or is it failing to stop the motion?

4. Perfect Doesn’t Fit

The ideal lighting arrangement rarely survives the transition from the engineering bench to the finished machine. As the design evolves, conveyors, guarding, actuators, wiring, maintenance access and other machine requirements often force the vision system to evolve with it.

A vision engineer developed an inspection that consistently detected the required feature during testing. As the machine design matured, the available space for the light and the camera changed. The result was a vision system prone to error.

The trade-off is not always between good lighting and poor lighting. It may be between the ideal optical solution and a practical, perhaps second-choice, option. Camera position, lighting angle and working distance must be balanced and adjusted to accommodate safety, maintenance access, mechanical design and available space while still producing a reliable inspection.

5. Paint with Wavelengths

The human eye sees a red apple because the fruit reflects red light and absorbs other colors. Machine vision cameras operate in the same way, but engineers can manipulate this relationship to create contrast where none seems to exist. Choosing the correct lighting is not just about the geometry of the light source; it is about the color—or wavelength—of the illumination.

Consider a pharmaceutical packaging line where a vision system must verify the presence of a green cap on a white plastic bottle. Under standard white light, the contrast between the green cap and the glossy white background can fluctuate with minor factory changes, leading to false rejects. The problem is the similarity of spectral information.

READ MORE: A Business Case for Advanced Machine Vision in Factory Automation

By switching the illumination to a vibrant red light, the green cap absorbs the red wavelengths and appears completely black to a monochrome camera, while the white bottle reflects the red light and appears bright white. The contrast becomes absolute. Conversely, if an engineer needs to look through a colored fluid or ignore a specific print mark on a package, flooding the scene with light of the same color will blind the camera to that feature, effectively erasing it from the image.

Different colors of light are a powerful tool for manipulating contrast. Before selecting a standard white LED, engineers should ask a colorful question: Should this inspection use light to highlight a feature’s color or to make that color disappear?

6. Lock Out the Room

A robotic inspection cell located near a loading dock began experiencing intermittent failures. The vision system performed perfectly during morning testing but, by afternoon, it repeatedly failed to locate a part’s alignment markers. The problem was ambient light pollution. As the sun moved throughout the day, changing beams of sunlight cut through the facility, overpowering the system’s dedicated inspection lights.

The vision system was faithfully analyzing the total sum of light hitting its sensor, unable to separate the helpful inspection light from the factory environment. The solution was to physically and optically lock out the room.

Engineers enclosed the inspection area to block physical shadows and attached a narrow-band optical filter to the camera lens. This filter acted as a security guard, allowing only the exact wavelength of the system’s dedicated LED light to pass through, while blocking out all ambient room light and sunlight. The background noise vanished.

Before declaring a vision system ready for production, engineers must ask an environmental question: Is this camera analyzing only the controlled lighting of the machine, or is the camera also seeing other light sources in the room?

What the Camera Never Sees

Every lighting decision emphasizes some information while reducing or eliminating other information. Whether the design consideration involves surface or silhouette, diffuse or directional illumination, motion and exposure or the realities of machine integration, the principle remains the same: The vision system can only analyze the information the lighting makes visible.

Before selecting a lighting strategy, engineers should ask six questions:

  • Does the inspection depend on the surface of the part or its silhouette?
  • What information must the camera distinguish?
  • Is the challenge illumination or motion?
  • Will the lighting strategy remain effective as the machine design evolves?
  • Should this inspection use light to highlight a feature’s color or should it use light to make that color disappear?
  • Is this camera analyzing the controlled lighting of the machine or is it seeing other light sources in the room?

 

About the Author

Steve Sterling

Steve Sterling is a Minnesota-based freelance writer and editor. 

Sign up for our eNewsletters
Get the latest news and updates

Voice Your Opinion!

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