Getting machine vision in focus

Designing a machine vision system is new territory for many engineers. Fortunately, it's a fairly systematic process, beginning with selecting a lens. In a machine vision system, the lens' job is to gather light and focus it onto a sensing plane. How well it does that depends on its field of view and resolution, the two most critical qualities associated with a lens.

Article Tools

Field of view (FOV), with respect to a lens, is the portion, or area, of an image that appears in focus on the sensing plane. If the lens' FOV extends beyond the perimeter of the sensor — be it a CCD, CMOS, or other photoelectric device — the system's FOV, naturally, will be smaller than that of the lens.

Resolution, a measure of image sharpness, is the lateral distance between the closest discernable features. This number can be misleading, however, because low values represent high resolution. To eliminate confusion, resolution may be quantified in terms of spatial frequency — the number of (discernable) line pairs per millimeter (lp/mm) in an image, equal to one divided by the distance between lines. Units of spatial frequency are more intuitive because high values represent high resolution, and low values represent low resolution.

Pixel by pixel

A good way to understand how FOV and resolution work is by relating them to an application. Suppose an assembly robot uses machine vision to position a 10-mm bolt in a hole and drive it home. If the initial position tolerance is ±10 µm, then the minimum FOV should measure 10 mm, allowing the vision system to see the entire hole and locate its center. Resolution, then, must be greater than 10 µm to stay within the error margin.

There is an underlying element that contributes to FOV and resolution. This is the pixel, the smallest unit into which an image can be divided. A minimum number of pixels is required for any vision sensor. Mathematically, this is stated as:

Np = 2Fov/dobj

where Np is the number of pixels in a line across the sensor. (The factor of two results from taking two adjacent pixels to identify the edge of an object — one to show where the object is, and the other to show where it is not.)

Fov is the linear size of the system's FOV

dobj is the size of the object's smallest feature of interest

For the assembly application, the robot positions a bolt within 10 µm of a circular hole's center, so dobj is 10 µm. At this object resolution in a 10 mm FOV, the machine vision system requires a sensor with at least 2,000 × 2,000 pixels, or a four megapixel camera.

After satisfying FOV requirements, the next step is choosing a lens to project the FOV onto the sensor. Each lens must contain appropriate primary or optical magnification, Mp, which is determined by:

Mp = Wsensor/Fov

where Wsensor is the image sensor's physical width.

Using Mp, we can find dobj :

dobj = dimg/Mp

where dimg is the real image's resolution projected onto the image sensor.

Suppose the image sensor on this four-megapixel camera is 15.2 mm across. This means a magnification less than 1.52X is required. To determine the necessary resolution, rewrite the dobj equation as:

Robj = Mp × Rimg

where Robj and Rimg are alternate definitions of object and image resolution respectively, in lp/mm. This definition of resolution leads to the modulation transfer function (MTF), which is graphed as image contrast versus spatial frequency. MTF describes a lens' ability to transfer object detail or contrast to the image plane.

Marketplace Ads

EngineeringTV


The Latest Videos from EngineeringTV.com

Back to Top