Lights make machine vision shine
The proper light source can ensure the success of your vision system.
Jon Titus, Editorial Director -- Test & Measurement World, 6/1/2001
Many people approach machine-vision projects from the wrong direction. Instead of worrying about computer power and image-processing algorithms, they should first think about light. Without the proper light in the right quantities and at the proper wavelengths, a machine-vision application will fail. Light always makes the difference between the success and failure in a vision system, and you need a good image before you need anything else.The emergence of a class of powerful, low-cost, stand-alone vision systems from manufacturers such as Cognex (Natick, MA), Coreco Imaging (Bedford, MA), and Keyence (Woodcliff Lake, NJ) further complicates the situation. People can now afford to apply vision systems in ways they might not have considered before. But these users—many of them novices—may get frustrated with their inability to capture good quality images. People will spend hours refining their image-analysis routines instead of attending to lighting problems they may not know exist.
No amount of image processing can substitute for the raw material in a good image. And good images can only come from paying careful attention to lighting and your cameras’ specifications.
|
| Figure 1. An array of LEDs in a Teradyne Optima 7350 directs light at different angles to produce a bright area of light on the underside of a PCB. A camera, below and in the center of the array, grabs an image for solder-defect detection and analysis. Courtesy of Teradyne. |
To start, you need to carefully define what you want to inspect and what you want the inspection results to tell you. You might inspect a PCB, for example, to ensure components and bar-code labels are in the proper place or to make sure the PCB has the proper orientation (Figure 1).
You could inspect LCDs to ensure all segments or pixels work properly and that turn-on and turn-off times meet specifications. Or, perhaps you need to gather dimensional information about assemblies that move rapidly down a production line. Your inspection needs could include checking a surface for flaws or checking a material for proper color. Often, you’ll use a machine-vision system to inspect a product for more than one of the characteristics listed above.
After you determine what you need to inspect, you can start to figure out how to best visualize each characteristic. Several references provide information about specific types of lighting and explain how you can use darkfield, brightfield, diffuse, and other lighting types to “bring out” the features you want to inspect (Refs. 1–5). In the end, though, you’ll have to experiment with a combination of light sources—LEDs, fiber-optic sources, quartz-halogen lamps, fluorescent lamps, and xenon flash lamps—to determine which source best meets your needs.
Some applications may need more than one source, perhaps a backlight to contrast with PCB edges and a set of LED sources to examine SMT components on the PCB. Usually, one type of light from one direction won’t solve every problem.
If you envision yourself entangled in lighting cables and mounting hardware, rest easy. You won’t have to buy and try every variety of light source. Instead, you can rely on experts at companies that supply light sources for use in machine-vision applications.
These experts regularly solve lighting problems and can work with you to solve your problems. They, too, need clear descriptions of what you want to inspect and what you want the inspection results to indicate. They’ll also need several known-good products and products that contain defects so they can experiment. Then, they can recommend how to approach lighting your product. (You can find a list of machine-vision lighting suppliers in the Online Buyer’s Guide)
Watch those wavelengths
Not only must you ensure light reaches the things you want the vision system to see, but you also have to make sure a source produces light at useful wavelengths. To enhance the contrast of a red label, for example, you may need a light outside the red end of the visible spectrum. The non-red light will “darken” the label in a black-and-white image, thus making it easier to observe. On the other hand, if you want red components to “disappear” from view, perhaps to unclutter an image, red light will do the trick. Now the red components simply blend into the background.
When you need to distinguish the edge of a product for metrology purposes, you need to ensure the edge contrasts with its background to provide a clear edge for the vision system. A backlight that contrasts with the edge may enhance the edges. And if you plan to rely on accurate contrast measurements to measure other attributes of your product or part, such as color, your light source must deliver uniform illumination across the entire area you plan to inspect.
|
| Figure 2. The LEDs in a blue light source shine on a reflective surface that projects the light down on an object. A camera (not shown) mounted above the source observes the object through the reflective surface. This on-axis illumination provides uniform illumination. Courtesy of RVSI/NER. |
To get the best images, you must match your camera’s specifications with the light you plan to use. If you plan to illuminate a product using blue light from LEDs (Figure 2), you need to specify a camera that offers high sensitivity at blue wavelengths. When your application calls for white light, you should choose a camera that has a fairly even response from the red to the violet end of the spectrum. Lighting suppliers and camera manufacturers can provide the specifications for their products so you can effectively match them to your application.
Reality strikes again
Experimenting with lights and cameras in a lab is one thing, but adapting a vision system to an existing production line, or to a new line, provides its own set of challenges. Many older systems have no provisions for a camera, lights, and some form of position sensing (you need to know when to capture an image). Thus, your setup may dictate the arrangement and type of lighting and camera you can use.
Here again, suppliers may offer you advice about alternate ways to solve a vision problem. If you plan to update or add a vision system to a few production lines, you’ll have to choose lighting products from manufacturers’ catalogs. If your machine-vision project encompasses 30 or more vision systems, lighting-equipment suppliers may offer to customize an existing product for you.
If the products you need to examine move along a production line, you’ll have to capture images on the fly. This type of image capture requires a light source that can provide enough light so the camera can produce a usable image. Although you can trade off longer exposure times for less light, a high-speed production line may narrow your options. At 10 parts/s, basic cameras can keep up with production, as long as you supply a bright enough light. An intense fiber-optic source or quartz-halogen source may suffice.
|
| Figure 3. A strobed LED source provides a short burst of bright light as a product moves through a product dispenser. The bright flash lets a camera quickly acquire an image of the moving item. Courtesy of CCS America. |
But as the production rate increases, you must decrease exposure time—so images don’t blur—and increase the intensity of light on the product. You may have to switch from an always-on light source to a strobed LED source (Figure 3) or a flash lamp. These strobed sources can produce short bursts of intense light. If you’re using a linescan camera to image a fast-moving product, a bright line source from a fiber-optic source may be your best bet. In any production situation, remember that as a product changes, you may have to adjust your light sources and camera to account for variations in color and size as well as other changes. And you must also take into account the lifetime of the light source.
LEDs come on strong
In the last few years, the machine-vision industry has made greater use of LEDs as light sources. The advent of bright LEDs as well as blue and white LEDs has increased their appeal in vision applications. LEDs are a low-cost alternative and have a long life compared to other light sources. They are easy to control and often get used in a pulsed mode that produces intense bursts of light. Large LED arrays let you switch patterns of LEDs on or off to direct light at a “target” from different directions as well as supply different colors at different intensities, depending on the application.
Anyone can buy a bag of LEDs and mount them on a PCB to produce a “light source,” but that doesn’t mean it’s a good light source. Producing the right kind of light with an array of LEDs that will work properly in a manufacturing environment takes knowledge of lighting, optics, and engineering. It’s hard enough to get lighting right using commercial sources, so leave light-source production to the experts.
LEDs aren’t a panacea for lighting problems, though. Manufacturers must carefully weigh characteristics such as operating temperature against current and voltage to get high light output and long life. Because LEDs remain on for only the brief period when a camera acquires an image, they can last for tens of thousands of hours. RVSI/Northeast Robotics (Weare, NH) specifies a 50,000-hr lifetime for one of its BL-50 LED backlights. That’s more than five years of use. In comparison, a typical fiber-optic light source that remains on constantly can have a 1000-hr lifetime, or about 135 eight-hr shifts. But even though LEDs can produce bursts of high-intensity light and can outlive fiber-optic sources, in many applications they can’t provide enough power to supplant a fiber-optic source.
As lighting technologies improve, so do camera technologies. Many newer cameras offer increased sensitivity, which means they need less light to produce a good image. Thus, these cameras, such as those in the Eclipse series of linescan cameras from Dalsa (Waterloo, ON, Canada), can use LEDs rather than fiber-optic sources for illumination.
You’ll have to consider another tradeoff, though. LEDs force you to pay careful attention to the spectral responsivity of cameras. Because LEDs produce almost monochromatic light, you should choose cameras that offer peak sensitivity at the same wavelengths of the light the LEDs produce. The combination of high-sensitivity cameras and high-intensity, long-life LEDs means vision-system builders can now tackle tasks that were beyond the capabilities of older technologies. But those older technologies, such as fiber-optic sources and flash lamps, won’t disappear anytime soon. T&MW
References
1. “Illumination for Machine Vision,” Dolan Jenner, Lawrence, MA. 12.31.52.97/jenner/equipment/guide.asp. Editor's Note 10/24/03:This link no longer works. Please use http://dolan-jenner.com/jenner/equipment/guide.asp.
2. Illumination Technology (East Syracuse, NY) offers a one-day seminar called “Lighting 101.” www.illuminationtech.com.
3. “Machine Vision Technical Guide: Lighting & Lenses,” Keyence, Woodcliff Lake, NJ, 2000. www.keyence.com
4. Masi, C.G., “Lighting Makes Its Mark on Vision Systems, ”Test & Measurement World , May 1998. p. 11.
5. VanDommelen, Carl H., “Choose the Right Light for Inspection, ” Test & Measurement World , October 1996. p. 53.
Jon Titus has written real-time software and designed embedded systems and computer/instrument interfaces. He worked in electronics for 10 years and spent nine years at EDN magazine prior to joining T&MW in 1993. He has a BS from WPI, an MS from RPI, and a PhD from VPI.
Talkback
Related Content
Related Content
Sponsored Links


















