Melles Griot   Machine Vision Guide
Machine Vision    Lens Fundamentals    Real Lens Parameters     
Lens Fundamentals

Real Lens Parameters

Resolution

Resolution is the ability of an optical system to distinguish between two features that are close together. For example, if a lens images a row of pins on an electrical connector, it must have sufficient resolution to see each pin as separate from its neighbors. A lens imaging a lot code on a pharmaceutical bottle must have sufficient resolution to distinguish one character from another. Resolution is also required to make sharp images of an edge. A lens with high resolution will show an edge transition in fewer pixels than a lens with low resolution.

There are many different definitions of lens resolution. They differ by what type of test object is measured (points, bars, sine patterns, or other objects), and by the criteria for determining when two objects are “resolved”. A practical measurement for machine vision uses three-bar targets of various spatial frequencies. A chrome-on-glass USAF-1951 target is a good test object. If the contrast between bar and space is greater than 20 percent, the bars are considered to be resolved.
 Resolution
 Diffraction
 Contrast
 Depth of Field
 Telecentricity
 Distortion
 Spectral Range

Resolution does not determine the dimensional accuracy to which objects can be measured. The position of a large object can be determined to within a fraction of a resolution spot under suitable conditions. Many vision systems determine positions to one-quarter pixel. On the other hand, if the lens has distortion, or if its magnification is not known accurately, then the measured position of a feature may be in error by many resolution spot widths.

Diffraction

Diffraction limits the resolution possible with any lens. In most machine vision calculations, we consider light as traveling in straight lines (rays) from object points to image points. In reality, diffraction spreads each image point to a spot whose size depends on the f-number of the lens and the wavelength of the light. This spot pattern is called an Airy disk. Its diameter is given by:

Formula

where DAiry is the diameter of the inner bright spot, l is the wavelength of light, and the f-number is the image side f-number. Since the wavelength of visible light is ~ 0.5 m, this means the diameter of the diffraction-limited spot (in mm) is approximately equal to the working f-number.

For example, a typical CCD camera has pixels that are 10 mm square. To form a diffraction-limited spot of this diameter, the working f-number on the image side should be ~ 10. An f/22 lens forms an image spot larger than a pixel. Its image therefore appears less sharp than that of the f/10 image. An f/2 lens image will not appear sharper than an f/10 image, since the camera pixel size limits the resolution. In this case, the system is said to be detector limited.

Contrast

Contrast is the amount of difference between light and dark features in an image. Contrast (also called modulation) is defined by:

Formula

Here, “light” is the gray level of the brightest pixel of a feature, and “dark” is the gray level of the darkest pixel. A contrast of 1 means modulation from full light to full dark; a contrast of 0 means the image is gray with no features. Finer (higher spatial frequency) features are imaged with less contrast than larger features. A high-resolution lens not only resolves finer features, but generally images medium-scale features at higher contrast. A high-contrast image appears “sharper” than a lower contrast image, even at the same resolution.

Factors other than lens resolution can affect contrast. Stray light from the environment, and glare from uncoated or poorly polished optics reduce contrast. The angles of the lens and of the illumination have a great effect on contrast. The contrast of some objects is dependent on the color of the illumination.

Depth of Field

Depth of field (DOF) is the range of lens-to-object distances over which the image will be in sharp focus. The definition of “sharp” focus depends on the size of the smallest features of interest. Because this size varies between applications, DOF is necessarily subjective. If very fine features are important, the DOF will be small. If only larger features are important, so that more blur is tolerable, the DOF can be larger. The system engineer must choose the allowable blur for each application.

In general, the geometrical DOF (figure 7) is given by :
Depth of field
Figure 7. Depth of field

 

To find the DOF for detector limited resolution, we choose the diffraction spot size created by the lens to be one pixel width in diameter, and the geometric blur due to defocus also to be one pixel width in diameter. With these assumptions:

Formula


Here, we set the image side f-number of the lens equal to the pixel width in mm. Wpixel is the pixel width in mm; m is the lens magnification. Thus, for a camera with 10-mm pixels, operating at 0.5x magnification, with an image side f-number of f/10, the DOF is 800 mm, or 0.8 mm.

These assumptions are very conservative. Using a higher f-number reduces the resolution of the lens slightly, but greatly increases the DOF. For example, with the lens operating at f/22 and allowing a geometric blur of two pixel widths, the DOF is 3.2 mm, which is four times larger. This is a better estimate if the important image features are larger than two pixels 40 mm. The choice of f-number and allowable blur depends on the requirements of the particular application.

Telecentricity

Telecentricity determines the amount that magnification changes with object distance. Standard lenses produce images with higher magnification when the object is closer to the lens. We experience this with our eyes. A hand held up near your face looks larger than when it is moved farther away. For the same field size, a longer focal length shows less magnification change than a short focal length lens.

A telecentric lens acts as if it has an infinite focal length. Magnification is independent of object distance. An object moved from far away to near the lens goes into and out of sharp focus, but its image size is constant. This property is very important for gauging three-dimensional objects, or objects whose distance from the lens is not known precisely.

A telecentric lens views the whole field from the same perspective angle. Thus, deep round holes look round over the entire field, rather than appearing elliptical near the edge of the field. Objects at the bottom of deep holes are visible throughout the field.

The degree of telecentricity is measured by the chief ray angle in the corner of the field (figure 8). In machine vision, a standard commercial lens may have chief ray angles of 10 degrees or more. Telecentric lenses have chief ray angles less than 0.5 degree. Some telecentric lenses have chief ray angles of less than 0.1 degree.

Telecentricity is a measure of the angle of the chief ray in object space and does not affect the depth of field.

Telecentricity
Figure 8. Telecentricity - (a) conventional camera; (b) telecentric lens

 
Depth of field is determined by the angles of the marginal rays. Chief ray and marginal ray angles are independent of each other.

The objective element of a telecentric lens must be larger than the field of view. The lens must “look straight down” on all portions of the field. Telecentric lenses for very large fields are thus large and expensive. Most telecentric lenses cover fields less than 6 inches in diameter.

Gauging Depth of Field

The gauging depth of field (GDOF) is the range of distances over which the object can be gauged to a given accuracy (figure 9). A change in object distance changes the image magnification and therefore the measured lateral position of the object. The gauging depth of field describes how precisely the object distance must be controlled to maintain a given measurement accuracy. Telecentric lenses provide larger gauging depths of field than do conventional lenses.

Gauging depth of field
Figure 9. Gauging depth of field
 
Distortion

In optics, distortion is a particular lens aberration that causes objects to be imaged farther or closer to the optical axis than for a perfect image. It is a property of the lens design and not the result of manufacturing errors. Most machine vision lenses have a small amount of pincushion distortion (figure 10). Relative distortion increases as the square of the field, so it is important to specify the field over which field distortion is measured.

Distortion is generally specified in relative terms. A lens which exhibits 2 percent distortion over a given field will image a point in the corner of its field 2 percent too far from the optical axis. If this distance should be 400 pixels, it will be measured as 408 pixels.

Lens distortion errors are often small enough to ignore. Because distortion is fixed, these errors can also be removed by software calibration. Lenses designed to have low distortion are available.

Pincushion distortion
Figure 10. Gauging depth of field
 
Spectral Range

Most machine vision lenses are color corrected throughout the visible range. Filters that narrow the spectral range to a single color sometimes improve lens resolution. CCD cameras are inherently sensitive to near-infrared (NIR) light. In most cases, there should be an NIR filter included in the system to reduce this sensitivity. Many cameras have NIR filters built in.


  Back to Top Previous    Next