Sensor size ↔ image circle diameter
The lens has to be able to illuminate the complete sensor area in order to avoid shading and vignetting.
Pixel size ↔ optical resolution
The lens 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.
Object resolution ↔ magnification
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. Only the knowledge of all these application specific parameters permits the correct selection of the optimum lens to meet the required field of view and image quality.
Camera sizes are often quoted in imperial units, although this does not precisely infer the physical dimensions of the sensor. It is actually a legacy from the pre-digital era, when many cameras used vacuum tubes.
When selecting a lens it is very important to ensure that the format size matches or exceeds that of the chosen sensor. The maximum sensor size is always part of the description of a lens. Sometimes the maximum image circle diameter is also indicated. This is a circle with the sensor diagonal as diameter.
To attach a lens to a camera, requires some type of mounting system. Both mechanical stability (a loose lens will deliver an out of focus image) and the distance to the sensor have to be defined. In order to guarantee compatibility between different lenses and cameras the following standard lens mounts are defined:
Smaller lens mount systems such as S-mount are normally used for board level cameras and micro head cameras. These lenses only allow a minimum of adjustment.
The most common type of lens mount used in machine vision applications is C-mount. It benefits from a very wide range of lenses and accessories.
The CS-mount is essentially the same as C-mount, but with a 5 mm shorter flange focal length. Commonly used in CCTV cost-sensitive applications. It is less common in machine vision.
Tip: A C-mount lens can be fitted to a CS-mount camera using a 5 mm extension ring, however, using a CS-mount lens on a C-mount camera will not allow the lens to focus.
F-mount is the name for Nikon's SLR camera lens mount system. Due to its large format area it is commonly used for line scan applications and large area sensors. Lenses can be easily exchanged thanks to the bayonet connection.
Historically this was an attractive cost option, as Nikon domestic SLR camera lenses could be used. However with SLR cameras adopting auto and motorised focus these have been discontinued. Other specialist suppliers do provide these albeit at a higher price point. For high vibration applications, most people prefer to look for screw mounts such as the M42 below.
Lenses with M42 mount (M42 x 1 and M42 x 0.75, sometimes called T-mount), or M58 x 0.75 and M72 x 1 mount are used as an alternative to F-mount for line scan cameras or high resolution sensors, as they are considered more robust.
For large format applications that require motorised iris and focus the Canon EF lens mount is also used.
Since the introduction of digital sensors in consumer photography more and more camera manufacturers have decided to abandon mirrors, because they were no longer necessary. Panasonic and Olympus have developed a mirrorless system: The Micro Four Third (MFT).
Some manufacturers of industrial cameras offer this mount, with all the necessary control electronics. Like every modern consumer camera system, the MFT controls aperture and focus through the camera. This means the lenses no longer have any aperture rings. Therefore manual control of MFT lenses is not possible as with all consumer lenses.
Particular disadvantages of consumer lenses are that they are not as stable as a screw mount like M42 and they can be discontinued without any advance notice. The advantage of the MFT mount is a well-defined back focal distance of 19.25 mm.
Note: It is essential to select a compatible lens for the chosen camera. This is not merely a mechanical consideration as some mounting systems such as the T-mount do not specify the back focus distance. This can result in an incorrect lens in the camera being unable to produce an image at all, or produce one that is out of focus.