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 sensor sizes are quoted in imperial units, although this does not directly give the physical dimensions of the sensor. They are strictly a 'format size' which is a legacy from the pre-digital era, when many cameras used vacuum tubes. When selecting a lens, it is very important to ensure that it has been designed to be used with a sensor of the same size or larger than the one being specified. It is also possible to use a camera with a smaller sensor than the lens size. 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 it is commonly used for line scan applications and large area sensors. Lenses can be easily exchanged thanks to the bayonet connection.
Lenses with M42 mount (sometimes called T-mount), or M58x0.75 and M72x1 mount are used as an alternative to F-mount for line scan cameras or high resolution sensors, as they are considered more robust.