There is a direct relationship between the sensor used in the camera and the most appropriate lens. Parameters such as sensor size and pixel size are of major importance. The machine vision lens must be able to illuminate the entire sensor area to avoid shading and vignetting. It must also be able to resolve the pixel size. The higher the optical resolution of a lens, the more detailed the structures reproduced.

The most commonly used machine vision lenses
The most commonly used type of lens for sensors with a resolution of less than about one megapixel is the universal lens with a standard fixed focal length of 4.5 to 100 mm. These machine vision lenses are optimised for focusing to infinity and have an MTF of 70-90 lp/mm with little distortion and vignetting. Shorter focal length lenses generally produce images with fisheye distortion.

Precision lenses, the high-resolution version of standard lenses, offer better viewing performance than standard lenses. They are generally available with focal lengths up to 75 mm, MTF above 120 lp/mm and very low distortion (<0.1%). They are particularly well suited for cameras with small pixel sizes or for precise measurement applications.

Macro lenses are available for small fields of view, approximately the size of the sensor. Specified in terms of magnification relative to the camera sensor, they are optimised for “close-up” focusing. Although they have very good MTF characteristics and negligible distortion, they lack flexibility as it is not possible to change the aperture or working distance.

At the other end of the scale are large-format lenses, which are needed when the sensor dimensions exceed those possible with a C-mount lens. They are usually modular, consisting of different components such as focus adapters, helical mounts and spacers.

Telecentric lenses are used in specialised metrology applications to avoid dimensional and geometric variations in images. These lenses do not suffer from distortion because they collimate the light entering them. This results in images with constant magnification, regardless of the distance to the object, without perspective distortion. Due to the parallel beam path, the aperture at the front of the telecentric lens must have at least the same diameter as the field of view. Lenses for large fields of view are therefore larger and therefore relatively expensive.

Electrically adjustable liquid lenses
New in the field of machine vision lenses are electrically adjustable liquid lenses, which bring many advantages to machine vision. They consist of a thin elastic polymer membrane containing an optical fluid that allows them to change shape (image 2). An actuator controlled by electrical pulses presses the liquid inside the lens from the outside, changing its curvature and achieving extremely short response times of a few milliseconds. They are particularly useful in applications where there is a need to change focus quickly, for example when inspecting cartons of different heights on conveyors. This unique principle allows faster and more compact optical systems to be designed without complex mechanics. An impressive MTBF (Mean Time Between Failures) of more than one billion movements means that the system has a very long service life, as the automatic adjustment of the lens relieves the other components of any movement. This optical device is a clear advantage for machine vision, especially for 3D microscopy or surveillance tasks.