WHAT'S NEW


05/01/2020
 
Posted By: Zach Darasz

Why is lighting important and what should I use?

Lighting is 80% of any given vision application. It's one of the first things I tell new customers that are looking at a new machine vision application. Regardless of software package, digital filtering and image pre-processing, or deep learning software capabilities, one thing has remained constant; if you can't see it, you can't detect it. Light is the foundation around which all cameras operate, so it makes sense that it should be given important consideration when working with industrial inspection systems. Fortunately, there is a wide breadth of options and technological innovations in the field of industrial lighting that have occurred over the past 10-15 years. But the range of options is massive, and without a basic understanding of why each type is used, it can be daunting. Hopefully the information below will shed some light (pun intended) on the types of lights that are out there and when they should be used, or not used.

Of course if you have a specific application you need help with, our engineers are happy to assist. We have a full lighting lab with an array of lights to choose from to solve your toughest machine vision applications.

Wait, I have lots of light on my factory floor, isn't that enough to see my part/feature?

We get this question a lot. While it's true you could try to use the ambient light in your building, the pitfalls of doing so greatly outweigh the monetary benefits. Factories are busy places, just by their nature. People are walking around, monitoring machines constantly. If someone walks too close to a camera inspection location, they could cast a shadow over the part; no more light. Is the inspection area near a window? Your lighting conditions will literally change with the weather, and if that window faces east or west, then expect some washed out images once a day. Use fluorescent tube lighting in the factory? Those lights use AC power, which means they are strobing at 100-120 Hz. The human eye can't see that, but digital inspection cameras can have exposures in the microseconds, resulting in bright and dark images depending on where in the AC sine wave the image was captured.

Using ambient lighting is almost always a bad idea.

Does ambient lighting still affect inspection systems with dedicated lighting?

Yes it does! Fortunately there are a number of ways to mitigate it. The most brute force approach is to put a shroud around the inspection area, but mechanically this isn't always possible (not to mention potentially expensive). Usually the simplest approach is to put light filters on the camera lenses. Not only will the filters serve as an inexpensive way to protect your fragile (and sometimes expensive) camera lenses, but you can get filters tuned to only allow very specific wavelengths of light to pass through. So depending on your light color and part/feature color, you can pick a filter that will only allow the camera to see the wavelength of the part or detail you are looking for, and as a byproduct eliminate most of the effects of ambient light wavelengths. The exception to this is sunlight. Since sunlight contains all visible wavelengths, as well as infrared and ultraviolet, you must prevent sunlight from reaching the part being inspected via a shroud or curtain.

Lighting Types

Direct lighting

Direct lighting can take almost any form factor, but it's usually in the form of a bar light, ring light, or spot light. As the name suggests, this type of light is pointed directly at the part, like a flashlight. It's the most common type of light used, and therefore usually the cheapest. Direct lighting is used to achieve the maximum amount of illumination on a part, and therefore works well in applications where the light and camera need to be far away from the part, or you need to look at a very large area. There are some drawbacks though. If your part or feature is particularly reflective, such as with a semiconductor wafer or a foil seal, the image may appear noisy, with lots of alternating bright or dark areas depending on the angle of the part or feature relative to the camera. Unless that reflectiveness is what you are trying to inspect, this usually causes some difficulty in processing the image.

Pros:

  • -Inexpensive
  • -Wide variety of form factors and illumination levels (ie. high-output)
  • -Great for non-reflective parts or features, as well as large parts
Cons:

  • -Use with reflective parts or features can yield variable or undesirable results

Examples:



Indirect lighting

Indirect lights are used when direct lights fail to create contrast along the edges of features you are trying to detect or inspect. Typically similar in form factor to the ring light or an array of bar lights, the angle of the light is positioned so that illuminated edges return light to the camera, while flat surfaces bounce light away from the camera. This of light is particularly useful in detecting scratches on flat surfaces. The challenges in using this type of light are usually mechanical. Since the light needs to be at such a low angle relative to the part, it usually needs to be very close to the part to be effective, sometimes just a few millimeters above it. The other side effect of this low angle is that the amount of light that reaches the part drops off significantly faster as the light is positioned further away from the part when compared to direct lighting.

Pros:

  • -Excels at aiding in detecting scratches or edges
Cons:

  • -Needs to be positioned close to the part or feature to be effective.
  • -Significant light drop-off over longer working distances
Examples:






Diffuse lighting

For specular or uneven surfaces, direct and indirect lighting may not work well. In general, light bounces off an object at a similar angle at which it hit it. So on uneven surfaces, this means that a fixed angle light may not return directly to the camera. This is where diffuse lighting comes in. The purpose of diffuse lighting is to cast light on the inspected part at as many angles as possible, so that the camera sees a nice even image instead of random bright and dark spots. These lights may take the form of a simple right light or bar light with a slightly opaque diffuser plate over the LEDs, or in the form of a dome light (also called a "cloudy day" light). A dome light has a ring of LED along the circumference of a half sphere that are points upwards into the sphere. The light bounces off the inside walls, and then down at the part. Since light is being shone down at every possible angle, even the most specular surfaces, such as crinkled tin foil, appear flat and evenly illuminated to the camera. However, since the light is so diffused, the actual amount of light that can reach the part is greatly reduced as the light is moved away from the part, so working distance is limited. In the case of a dome light, there is also a light drop off the closer the part gets to the dome edge. Because of this, dome lights usually need to be sized to be about 50% larger than the part itself, and large dome lights can be expensive.

Pros:

  • -Excellent for inspecting specular, uneven, or reflective surfaces
Cons:

  • -Needs to be positioned close to the part or feature to be effective.
  • -Significant light drop-off over longer working distances
  • -Can get expensive
Examples:





Back-lighting

Need to inspection an external dimension? Few lights will do the job better than a backlight. Popularized by their use in optical comparators, backlighting is the idea of having a light pointed directly at the camera, positioned behind the part being inspected. The light creates a perfect silhouette image of the part, allowing for very precise inspection of external dimension, especially when paired with high resolution cameras and polarizing filters. Mechanically they can be a little tricky to implement on in-line inspection though. If parts are coming down on a conveyor, a different approach may need to be taken, or the part may need to be manipulated before reaching the inspection point

Pros:

  • -Perfect for dimensional analysis
  • -Thin design makes mounting very easy
Cons:

  • -Can be difficult to implement on an existing production line without automated part manipulation
Examples:





Coaxial lighting

If you need the ability to inspect dimensions but can't use a backlight, or look for scratches on a reflective surface, or both, then a coaxial light might be a good fit. Coaxial lights work by emitting light through a diffuser at a right angle, bouncing the light off of a 45° half-mirror down to the part, and then allowing only light to pass back through the mirror that is traveling straight at the camera (similar to a polarizer). The effect is extremely even illumination of flat surfaces and crisp part edges; excellent for dimensional inspection. Since the only light that can reach the camera is the light makes it straight through the half-mirror, scratches and imperfections show up very darkly, while the surrounding area is very bright. This effect is so dramatic, that you'd even be able to see fingerprints on the back of a CD (remember CDs?!) with excellent contrast. So why not use this amazing light that sounds like it could do it all in every application? Well with it having a diffuser, it really only works well if light can be close to the part. Since the light has so many components (LEDs, diffuser plate, half-mirror, optical grade glass) they can get very big depending on your part size, and pricey. Of the lights we've discussed so far, this type of light is typically the most expensive, but for the performance it can be well worth the investment.

Pros:

  • -Great at dimensional analysis
  • -Excellent for looking for surface defects on flat surfaces
Cons:

  • -Needs to be positioned close to the part or feature to be effective
  • -Significant light drop-off over longer working distances
  • -Can get large and expensive
Examples:





A note on color

We've discussed lights of all shapes, sizes, and technology types, but how do you choose the color of light to use? Selecting colors can be simplified into one concept; like reflects like. When light hits an object, some of it is reflected, and some is absorbed. What is reflected depends on the wavelength of the object, and the wavelength of the light. A red object will reflect all the light coming from a red light source, and a green object will reflect all the light coming from a green light source; in either scenario, the object would look very bright to a camera. However a red object would absorb much of the light from a green light source, making the object appear dark. In automated inspection systems, you want to create the maximum amount of contrast between the feature you are looking for and the rest of the part. If you are trying to make a feature look bright, use a light color that is closest to that feature's color, and if you can, pick a color that will make everything else look dark.

For example, if you were trying to read red text on a green background, you'd want to use a red or green light. Either would result in excellent contrast. You would not want to use a blue light, because blue falls right between red and green; to the camera, the text would look no different than the background.

So keep a color wheel handy!



If you are using color cameras, you'll almost always want to use white light. White light and sunlight contain all the wavelengths of visible light, so the only way to perform color inspection of parts is with white light.

If you have any questions about light selection, or would like any assistance solving your challenging machine vision application, please contact our office and one of our talented automation engineers would be more than happy to assist you.




Copyright © Axis New England. All rights reserved.
Twitter LogoLinked In LogoYouTube Logo
Powered by DreamingCode