One of the three most important components of a machine vision camera system is, in addition to the camera and illuminator, the lens. It is a system of precisely arranged optical lenses that creates a sharp, inverted image from the light reflected from the scene. The shape, number and arrangement of the lenses are calculated by entering parameters such as focal length, aperture or minimum focusing distance. The explanation of these parameters is the subject of this text.
The most important and most frequently mentioned feature of the lens is its focal length, which is given by the construction of the lens. This parameter, in combination with the size of the sensor, determines the angle of view. In other words, the focus determines the viewport of the scene that we will record. In general, the longer the focal length, the smaller the angle of view. Because the resulting section is always projected on the same area of the sensor, the subjects in the image taken by the long focal length lens are larger. Conversely, if the focal length is smaller, a larger angle is displayed – the resulting image shows the same smaller objects, but shows a larger shot.
From a technical point of view, the focal length can be described as the distance between the optical center of the lens and the plane on which the lens can focus the subject, ie where all the rays of light passing through the lens intersect. Fixed focus lenses are the best and brightest , because their design complexity, especially the number of mutually moving parts, is an order of magnitude lower than that of varifocal or zoom lenses. In general, fixed focal length lenses are more recommended for machine vision applications, as it is not possible to ensure parameter stability over the entire range of zoom lenses. In addition, in these applications we usually do not change the distance of the monitored object from the camera, and therefore we choose the system as simple and stable as possible, ie a suitable fixed focus.
Luminosity (or minimum aperture or aperture) describes the lens’s ability to transmit light and is denoted by the letter f together with a number, such as f / 2.8. The lower the number, the more light the lens is able to transmit, and the shorter the time you need to properly expose the image, which is important, for example, when watching fast events on the production line. For zoom lenses, the aperture range for wide and long focal lengths (such as f / 3.5-5.6) is indicated. Even with the best zooms, the brightness is usually better than f / 2.8. On the other hand, with fixed foci, a luminosity of up to f / 1.4 can be achieved due to their simpler construction. The term aperture is sometimes replaced by the so-called minimum aperture value of the lens. The lens iris (“Iris”) is a mechanical device composed of thin metal lamellas that form a ring inside the lens, which can be closed or opened smoothly, thereby controlling the amount of light passing through the lens and incident on the image sensor. As with luminosity, the lower the minimum aperture value, the less light is lost as it passes through the lens. It is marked with a capital letter and a number, eg F2.8 or only a minimum aperture number without the letter 2.8. Luminosity is also sometimes simply defined as the ratio of the focal length of the lens to the diameter of the maximum open aperture of the lens. Insufficient lens aperture can be compensated to some extent by the intensity of the lighting used, but it is not an ideal solution. that the lower the minimum aperture value, the less light is lost as it passes through the lens. It is marked with a capital letter and a number, eg F2.8 or only a minimum aperture number without the letter 2.8. Luminosity is also sometimes simply defined as the ratio of the focal length of the lens to the diameter of the maximum open aperture of the lens. Insufficient lens aperture can be compensated to some extent by the intensity of the lighting used, but it is not an ideal solution. that the lower the minimum aperture value, the less light is lost as it passes through the lens. It is marked with a capital letter and a number, eg F2.8 or only a minimum aperture number without the letter 2.8. Luminosity is also sometimes simply defined as the ratio of the focal length of the lens to the diameter of the maximum open aperture of the lens. Insufficient lens aperture can be compensated to some extent by the intensity of the lighting used, but it is not an ideal solution.
Minimum Focusing Distance
The minimum focusing distance determines how close the subject can be so that the lens can still focus. The lenses reach their maximum shooting scale (magnification) just at the minimum focusing distance. However, because focusing at a distance closer than infinity necessarily lengthens the focus of the lens, the brightness of the lens decreases. The minimum focusing distance can be significantly shortened, increasing the magnification of the lens using the intermediate rings or adapters. However, this is again used more in digital photography, where a number of different scenarios are photographed. In the case of a predetermined and unchanging scene, we choose a lens with a suitable focal and minimum focusing distance, which we then do not have to correct.
The lens format is the size of the camera‘s image sensor in inches, for which the focal length of the lens is calculated. The lens formats used are 1/3 “, 1/2”, 2/3 “and 1”. The lens format should not be smaller than the camera image sensor format. When using a lens with a format smaller than the size of the image sensor, the edges of the image would not appear and would remain dark, because the extreme rays of light falling from the lens onto the image sensor would not be completely projected on the entire sensor surface. the rays would be projected only on the central part of the sensor and the so-called vignetting would occur. Conversely, when using a 1/3 ”lens on a 1/4” image sensor, the displayed image will be “magnified” from the lens point of view, because the outermost rays of the captured image will fall outside the image sensor and the image will be partially cropped.
Each optical system exhibits a number of defects and distortions caused by the imperfections of the assembly, the refraction of light and, in general, its waveform. The following overview shows the most common defects and the possibility of their correction:
- Perspective image distortion – unfortunately, this distortion always occurs with standard (endocentric) lenses. In many machine vision applications, where we measure color, the mere presence of an object, or the number of objects, this doesn’t matter much. However, if accurate measurement of dimensions or position is necessary, it is a defect, the presence or absence of which can diametrically change the result of the analysis. In this case, so-called telecentric lenses are used. The principle of telecentric lenses is the shielding of rays coming from directions other than parallel to the optical axis by means of an aperture diaphragm located in the plane of the image main point (ie the focus of the lens). In other words: the diameter of the input member of the optical system is equal to the diagonal of the field of view – the diagonal does not change when the scanning distance is changed.
- Optical defects – simple imaging equations, which we count on when imaging with a lens, apply only to monochromatic light and rays in close proximity to the optical axis, but as you move away from the axis, complex phenomena begin to appear that distort the image in some way. These defects affect all lenses and can only be mitigated with greater or lesser efficiency. These defects can be spherical, astigmatic, asymmetrical, chromatic, barrel-shaped, cushion-shaped or wavy.
- Vignetting – this is an even loss of light from the center of the image to the edges. It manifests itself when the lens is completely dimmed. As the aperture ring closes, this defect decreases to a certain aperture value.
- Centering – This is the reduced sharpness of the image in the corners of the image. It reappears when the lens is completely dimmed. As with vignetting, closing the shutter ring reduces this defect.
- Reflections – these are unwanted reflections of light on individual members of the optical system – the inner part of the lens barrel, aperture ring and other components inside the lens. These reflections result in a variety of light spots and light haze in the images. In practice, the more optical elements, the more susceptible the lens is to this defect. Therefore, fixed focus lenses are less prone to this defect. To eliminate this defect, lens manufacturers use anti-reflection coatings on optical elements and special surface treatment of individual lens components. If we use filters mounted in front of the lens, it is necessary that these are also provided with high-quality anti-reflective layers.
- Chromatic aberration – is the result of different refractive index of individual colors in the light spectrum. This defect affects the sharp and contrasting edges of objects in the image, which appear as a contour in the color spectrum and is slightly blurred. Manufacturers try to correct this defect by using different materials to produce optics with different refractive index.