All machine vision systems rely on the production of an image of sufficient quality to allow the required measurements to be made. Clearly the lens or lens combinations used in the vision system plays a crucial role in determining the quality of the image produced. It has an impact on many other factors as well: these include the speed that can be achieved, measuring accuracy, and the reproducibility and reliability of the downstream analysis. Although fixed focus lenses are available, most lenses for machine vision applications are manufactured with metal housings and focus mechanisms.
There is a direct relationship between the sensor used in the camera and the most suitable lens. Parameters such as sensor size and pixel size are of major importance. The lens has to be able to illuminate the complete sensor area in order to avoid shading and vignetting. It also has to be able to resolve the pixel size. The better the optical resolution of a lens, the better detailed structures can be reproduced. The optical quality of a lens is defined by the MTF (modulation transfer function) relating to resolution along with the optical distortion. In order to resolve the details of an object and to ensure definite edge detection, the detail should be reproduced across about 4 pixels. Thus the required magnification is dependent on the required object resolution and the respective pixel size. The ideal lens would produce an image which perfectly matches the object, including all details and brightness variations. In practice, this is never completely possible as lenses act as low pass filters. The amount of attenuation of any given frequency or detail is classified in terms of MTF and for any lens there is a point at which the modulation is zero. This limit is generally called the resolution limit and is usually expressed in line pairs per millimeter (lp/mm). Not surprisingly, with the enormous range of sensor formats and resolutions available in machine vision cameras combined with a multitude of possible applications, there is also a very wide choice of lenses, including many specialized lenses.