Understanding Telecentricity and Perspective Error
Section 1: The Advantages of Telecentricity
The ability to quickly perform repeatable, high accuracy measurements is critical to maximizing the performance of many machine vision systems. For such systems, a Telecentric Lens allows the highest possible accuracy to be obtained. This section discusses the unique performance characteristics of Telecentric Lenses and how telecentricity can impact system performance.
Zero Angular Field of View: Parallax Error Elimination
Conventional lenses have angular fields of view such that as the distance between the lens and object increases, the magnification increases. This is how the human vision behaves and contributes to our depth perception. This angular field of view results in parallax, also known as perspective error, which decreases accuracy, as the observed measurement of the vision system will change if the object is moved (even when remaining within the depth of field) due to the magnification change. Telecentric Lenses eliminate the parallax error characteristic of standard lenses by having a constant, non-angular field of view; at any distance from the lens, a Telecentric Lens will always have the same field of view. See Figure 1 for the difference between a non-telecentric and a Telecentric field of view.
Figure 1: Field of view comparison of a conventional and Telecentric Lens. Note the conventional lens’s angular field of view and the Telecentric Lens’s zero angle field of view
A Telecentric Lens’ constant field of view has both benefits and constraints for gauging applications. The primary advantage of a Telecentric Lens is that its magnification does not change in respect to depth. Figure 2 shows two different objects at different working distances, both imaged by a Fixed Focal Length (Non-Telecentric) Lens (center) and a Telecentric Lens (right). Note that in the image taken with a Telecentric Lens, it is impossible to tell which object is in front of the other. With the Fixed Focal Length Lens, it is quite obvious that the object that appears smaller is positioned farther from the lens.
While Figure 2 is drastic in terms of a working distance shift, it illustrates the importance of minimizing parallax error. Many automated inspection tasks are imaging objects that move through the field of view of an imaging system, and the position of parts is rarely perfectly repeatable. If the working distance is not identical for each object that the lens is imaging, the measurement of each object will vary due to the magnification shift. A machine vision system that outputs different results based on a magnification calibration error (which is unavoidable with a Fixed Focal Length Lens) is a non-reliable solution and cannot be used when high precision is necessary. Telecentric Lenses eliminate the concern about measurement errors that would otherwise occur due to factors such as a vibrating conveyor or inexact part locations.
Figure 2: The angular field of view of the Fixed Focal Length Lens translates to parallax error in the image and causes the two cubes to appear to be different sizes
Telecentric Lenses and Depth of Field
It is a common misconception that Telecentric Lenses inherently have a larger depth of field than conventional lenses. While depth of field is still ultimately governed by the wavelength and f/# of the lens, it is true that Telecentric Lenses can have a larger usable depth of field than conventional lenses due to the symmetrical blurring on either side of best focus. As the part under inspection shifts toward or away from the lens, it will follow the angular field of view (or the chief ray) that is associated with it.
In a Non-Telecentric lens, when an object is moved in and out of focus, the part blurs asymmetrically due to parallax and the magnification change that is associated with its angular field of view. Telecentric Lenses, however, blur symmetrically since there is no angular component to the field of view. In practice, this means that features such as edges retain their center of mass location; an accurate measurement can still be made when the object is beyond best focus as long as the contrast remains high enough for the algorithm being used by the machine vision system to function properly.
While it may seem counterintuitive, blur can be used advantageously in certain applications with Telecentric Lenses. For example, if a machine vision system needs to find the center location of a pin, as shown in Figure 3a, the transition from white to black is quite sharp when the lens is in focus. In Figure 3b, the same pin is shown slightly defocused.
Figure 3a and b: The same pin imaged both in and out of focus. Note that the transition from white to black covers many more pixels when the lens is slightly out of focus (b). This can be advantageous!
Looking at a plot of the image grey levels from a line profile taken across the edge of the part, as in Figure 4, the slope of the line is much shallower for the slightly defocused image, as the pin edge is spread over more pixels. Due to the symmetric blurring of the Telecentric Lens, this blur is still usable as the centroid has not moved and the amount of sub-pixel interpolation needed is decreased. This reduces sensitivity to grey level fluctuations caused by sensor noise and allows the pin center location to be found more reliably and with higher repeatability.
Figure 4: Plot showing the difference in slope between a focused and defocused edge. The defocused edge takes up many more pixels; finding the edge becomes easier without relying on sub-pixel interpolation
Telecentricity and Distortion
Another advantage of using Telecentric Lenses in metrology applications is that Telecentric Lenses typically have lower distortion values than Fixed Focal Length Lenses. Distortion causes the actual position of an object to appear as though it is in a different location, which can further decrease measurement accuracy. For example, Figure 5a shows jumper pins on a circuit board that has been imaged by a Fixed Focal Length Lens with high distortion. The distortion, coupled with the parallax error inherent to Non-Telecentric lenses, makes the pins toward the edge of the image appear as though they are bent toward the center. When looking at the same pins with a Telecentric Lens, as in Figure 5b, it is apparent that the pins are indeed straight.
Figure 5: Comparison of jumpers on a circuit board. Figure 5a shows an image that has been taken with a Fixed Focal Length Lens. Figure 5b shows an image that has been taken with a Telecentric Lens. Note that the pins do not appear bent in the Telecentric image
While it is true that distortion can be calibrated out of images to partially improve the accuracy, the parallax is still present and will cause error. The other advantage to not needing to calibrate out the distortion from the Telecentric Lens is that the measurement process can run faster as there is less computing that the software needs to do, reducing CPU load and directly leading to higher system throughput and more parts measured per minute. Because Telecentric Lenses tend to have such low distortion, they are more prone to having non-monotonic wave distortion than fixed focal length lenses, as shown in Figure 6. While the magnitude of the distortion is generally low enough to not have a significant impact on the measurement of the part under inspection, it is still important to check the distortion specifications of the Telecentric Lens and to properly calibrate the imaging system utilizing the Telecentric Lens. This property is also why distortion plots should be used rather than a single numerical value, as the lens can have zero distortion at the field point where it is specified, but be non-zero elsewhere.
Figure 6: Non-monotonic, or wave distortion typical of telecentric lenses
In applications where the object plane is tilted, Telecentric Lenses provide a good alternative to Fixed Focal Length Lenses due to their low distortion and invariant magnification. The camera can also be tilted to keep the tilted object in sharp focus; this is called the Scheimpflug condition. The Scheimpflug condition is a way to extend the depth that is being observed by the machine vision system by tilting the object plane and the image plane, as shown in Figure 7. If a conventional lens is used this way, it will result in keystone distortion. Telecentric Lenses, however, will not demonstrate keystone distortion, as the magnification does not change with depth. Care must be taken in calibration, though, as the part will be observed as a geometric projection: a circle will be an ellipse, a square will be a rectangle, and so on.
Figure 7: A 1X Telecentric Lens in the Scheimpflug layout, with tilted object and image planes
Section 2: Distortion and the Telecentricity Specification
As discussed, the elimination of both parallax and distortion play large roles in determining the quality of a particular Telecentric Lens. The distortion of Telecentric Lenses can be specified in two different ways: TV distortion or geometric distortion. Both are generally classified as a percentage value, but TV distortion values will almost always be lower than geometric distortion values, which can be misleading. When a Telecentric Lens is specified with geometric distortion values, the value that is given is at the maximum field height of the maximum sensor size that the lens is capable of. In the case where the lens has monotonic distortion, the value that is specified will be the highest. However, in the case of wave distortion, it is important to look at the plot (as in Figure 6) to determine how the distortion is actually characterized.
The other relevant specification is telecentricity, which is generally specified in degrees, and can be thought of as the residual angular field of view of the lens. Unfortunately, just as no lens has zero distortion, no lens is perfectly telecentric. Figure 8 shows a plot of the telecentricity for a 1X Telecentric Lens. The plot in Figure 8 shows three different lines, each representing the telecentricity at different wavelengths (red, green, and blue). The most important nuance to note about the plot is that the telecentricity varies with wavelength, meaning that the accuracy of a measured part can change depending on the wavelength (color) of light that is used to inspect the part. While this variance is small in an absolute sense, it is important to consider when designing systems that require the highest possible accuracy. For these systems, it is best to use monochromatic illumination, preferably the wavelength where the telecentricity was optimized in the design process.
Figure 8: Telecentricity plot for a typical Telecentric Lens
Section 3: Telecentric Lens Size Control
The field of view of any Telecentric Lens is limited by the front optic diameter; the larger the required field of view, the larger the front optic diameter. Telecentric Lenses can grow quite large and heavy with small magnifications, as such magnifications require large front optics; this can be prohibitive in some setups where weight or size is a concern.
The f/# of a lens also plays into the size of the lens, particularly at large magnifications where the front optics also grow with the speed of the lens. Figure 9 shows two different 4X Telecentric Lenses of different f/#s. The lens at the top of Figure 9 shows a system that runs at f/6, and the lens at the bottom runs at a much slower f/16.
If a particularly large field of view is required, Fixed Focal Length Lenses can be augmented with additional optics in order to produce a pseudo Telecentric Lens for large fields of view. Figure 10 shows a 25 mm Fixed Focal Length Lens that has been augmented with a Fresnel Lens to make a Telecentric Lens that has an 8” field of view. This type of augmentation always has lower image quality than a specifically designed Telecentric Lens, but can be useful where cost-sensitive, large field of view applications require telecentricity. This approach allows for minimal flexibility with regards to working distance, as well as substantial chromatic aberrations due to the use of a Fresnel Lens.
Figure 9: Two 4X Telecentric Lenses, operating at f/6 (top) and f/16 (bottom), showing how f/# can partially dictate element size for Telecentric Lenses
Figure 10: A Fixed Focal Length Lens augmented with a Fresnel Lens, making it pseudo-telecentric