Use machine vision for precision gaging.

Machine vision systems may be the best source for precision measurement. Source: Dalsa


Human vision is capable and flexible but cannot make fast, precise and repetitive measurements. In these cases, a machine vision system is the best choice. There have been many articles on the basics of machine vision, but here we will concentrate on how to use a machine vision system for precision optical gaging.

One of the best methods for precision optical gaging is to light the part being measured from behind using collimated light, which are parallel light rays, such as a searchlight. This casts a sharp shadow of the part into a telecentric lens-a lens that accepts only parallel light rays-and forms an image on a high-resolution digital camera. Edge positions on the part are then measured to a fraction of a pixel using high-precision machine vision algorithms.

We will examine how this works in a real-life situation, and then further explore the elements of a machine vision system necessary for precision gaging.

A pin part as seen “in flight” and measured by software. Source: Dalsa

Precision Gaging in the Automotive Industry

Engineering Specialties Inc. (ESI, North Branford, CT) manufactures millions of small, high-precision automotive parts. ESI custom builds machines to form and inspect these parts for defects. An example is a machine that inspects pins used in a car seatbelt. These pins are cut from wire, the ends are chamfered and a small, circumferential notch is formed with an Escomatic screw machine. The pin diameter is 60 mils (60/1,000 of an inch). Formed pins are put in a feeder bowl, serialized and dropped so that they fall between a collimated light source and a telecentric lens with a high-resolution camera. As they fall under the influence of gravity, a photosensor detects the part and tells a machine vision computer to trigger image acquisition from the camera. The computer runs machine vision software to find the part and determine its angle in the image. The software then gages the part at multiple diameters, including the circumferential notch.

Parts that do not meet tolerances are blown sideways into a reject bin. Defects are recorded and presented as Pareto charts to help ESI improve the manufacturing process. Good parts fall into a bin and are shipped to ESI’s customer. Parts are processed at the rate of two per second, primarily limited by the time required for the part to accelerate due to gravity and fall through the light-lens-camera sensor cell.

This inspection system runs 24/7 unattended. When the system needs more parts or servicing, it uses a wireless network to e-mail and telephone an operator, even at the operator’s home. The operator interacts with the machine using a custom Visual Basic interface built “on top” of the machine vision software.

Carmen Ciardiello, vice president and general manger of ESI, admits that this seems like a lot of work for a little part. However, “We built this machine because it makes economic sense given that we make 10 million of these parts a year,” Ciardiello says. “We also are risk averse so we want to make sure that zero defective parts go into seat belts.”

A progressive punch press stamps and forms a strip of metal into parts. Each part on the strip is inspected by a vision system that includes a collimated light source (1), a telecentric lens (2), a high-resolution camera (3), and a computer for edge extraction, human-machine interface (HMI) and reporting. Source: Dalsa

Precision Gaging in Detail

Consider dimensioning strips of stamped metal parts, used for automotive electrical contacts. These parts are stamped and formed by a progressive punch press and inspected as they emerge from the press. Catastrophic failures-such as a die in the press breaking-are easy to detect. Detecting subtle changes in the parts’ dimensions, however, requires a carefully designed machine vision system. These subtle dimension changes warn that a die is wearing and so the parts are at risk of going out of tolerance.

A collimated, narrow-band light source illuminates parts from behind and casts a shadow of the part that is imaged by a telecentric lens and high-resolution camera. The collimated light’s rays are perpendicular to the part and give sharply defined part shadows. There is very little “bleed” of light around part edges so measured edge shadow positions are more stable as light intensity changes.

Shadow casting (parallel projection) using collimated light also reduces effects of part depth change on the imaged part dimensions. As the part moves toward and away from the camera, shadows cast by the part in the beam of collimated light do not change significantly in size.

A common type of collimated light has a point light source placed at the focal point of a magnifying lens, typically a Fresnel lens. A magnifying lens brings collimated rays of light to a focus point. This collimated light source is the reverse: a point light source at the focus goes “back” through a magnifying lens and becomes collimated.

Collimated light sources also can be made by running a telescope in reverse-light is input at the eyepiece and comes out of the objective lens in a collimated beam. Some vendors use the phrase “telecentric light” for a collimated light, to indicate that the light rays are parallel to the optic axis and that the light source is to be used in combination with a telecentric lens.

Colored LEDs are commonly used as light sources for collimation. The LED’s narrow bandwidth, about 25 nanometers (nm), allows a sharp focus of the imaging (telecentric) lens without introducing self-interference (speckle) effects seen in a coherent source such as a laser. As the LED wavelength decreases (toward the blue), measurement resolution increases slightly due to reduced effects of diffraction. This is usually only a concern when using a microscope to measure dimensions approaching the wavelength of light.

Formed pins in a feeder bowl are serialized and dropped past a collimated light (1) and photosensor. A part image is taken through a telecentric lens (2) with a high-speed camera (3). A computer processes the image to gage the pin part. The operator interface is shown on the right. Source: Dalsa

Importance of a Telecentric Lens

A telecentric lens has a stop that blocks light rays that are not parallel to the optical axis of the lens, which is the imaginary line from front to back at the center of the lens and perpendicular to the part being imaged. This complements the effects of collimated light by further reducing light “bleed” around part edges and further suppressing changes in imaged part size with shifts in part depth.

A telecentric lens also has little optical distortion so calibration and distortion correction are more precise. As only parallel light rays are accepted by the telecentric lens, the light from the collimated source is efficiently used and ambient light is rejected so part image contrast is high. However, the field of view of a telecentric lens is limited to the size of the lens’s objective (the lens element facing the part). Microscope and other low- distortion lens designs also are used for precision measurement.

Sub-pixel Measurements and Camera Resolution

To be conservative, pixels on the camera’s sensor should be no larger than twice the desired gage resolution. In this example, the field of view is 1 inch x 1 inch, and a 1,600 x 1,200 (width x height) pixel camera with 4.40-micron pixels was used. This gives a pixel size on the part of 0.625 mil, and half of that gives a sub-pixel resolution of about three ten-thousandths of an inch, as required by the customer.

How can one measure part edge positions to less than a pixel? As an edge moves across a pixel the measured pixel intensity changes, but not in any way that could be used to determine position, at least with the square pixels used in most machine vision cameras.

To make sub-pixel measurements, use the expected intensity profile across the edge being gaged. Assume that the edge intensity is a step that is blurred by the optics into an S-shaped curve so edge position information is “smeared” out into adjacent pixels.

One can then recover the edge position within a pixel by looking for a peak in the first derivative of this intensity curve, or by other mathematical methods. This gives 1⁄4 to 1⁄25 sub-pixel resolution, depending on the image and part edge quality.

Finer sub-pixel resolution requires additional assumptions about the intensity structure of the edge and may not be appropriate when measuring parts whose edges change, such as due to the stamping die wear. By designing the imaging system to require ½-pixel resolution, one is well within what sub-pixel computation can do.

The camera sends the image via Gigabit Ethernet to a computer with specialized hardware for image processing and control of the inspection system. The computer uses software to gage dimensions on each part and alert an operator when these dimensions are out of tolerance.

Precision gaging requires careful attention to each step of the process. It is best to start with a collimated backlight to give sharp edge shadows and image the edges with a telecentric lens and high-resolution digital camera. Machine vision software with precise sub-pixel edge algorithms are then used to gage part dimensions and to control the reporting and sorting of parts.



Ben Dawson is director of strategic development at Dalsa (Billerica, MA). For more information, call (978) 670-2002, e-mail [email protected] or visit www.dalsa.com.



Tech Tips

- Machine vision systems can be used for precision optical gaging; precision gaging requires careful attention to each step of the process.

- It is best to start with a collimated backlight to give sharp edge shadows and image the edges with a telecentric lens and high-resolution digital camera.

- Machine vision software with precise subpixel edge algorithms are then used to gage part dimensions and control the reporting and sorting of parts.