Lenses are a complicated and nuanced component in imaging systems. It is not always straightforward which decisions to make when it comes time to choose a lens and what tradeoffs are made as a direct result of those decisions. Lens specification sheets vary between manufacturers, which can make comparisons a daunting task. Oftentimes, however, the problem isn’t as complicated as minute differences between lenses, as it can be challenging enough to determine even the type of lens that is required for a particular application. Is a prime lens the best choice? What about a zoom lens? Or a telecentric? In this two-part article, part one will explain the differences between the most common types of lenses used in machine vision, and part two will explain how best to choose what is required for any given application.
Variable Magnification Lenses
Fixed Focal Length Lenses
Fixed focal length lenses are lenses that have a fixed angular field of view. These lenses can still focus at different working distances, and this is most often achieved by moving all of the individual lens elements together such that the relative spacing between them does not change. Fixed focal length lenses should be used for the vast majority of machine vision applications, as they are flexible and have great performance. Fixed focal length lenses are also known as prime lenses (a term that comes from photography).
Figure 1 shows a 75 mm focal length fixed focal length lens focused at two different distances. Note that the spacing between each element did not change as it was focused, but the distance between the image plane and the last lens element varies a great deal. The top lens is focused at optical infinity, and the bottom lens is focused at 200 mm away from it (a 200 mm working distance).
Figure 1: A 75 mm Double Gauss-type fixed focal length lens focused at two different working distances. Note that the spacing between each element did not change as working distance shifts.
It is important to note that true fixed focal length lenses will always behave as in Figure 1, though some lenses exist that have a “floating element focus,” where the relative element spacing does change through focus. This spacing change does impart a change in the focal length of the system, though it is usually not enough to classify them differently.
Where fixed focal length lenses are lenses designed to have a fixed angular field of view, zoom lenses are designed to change their focal length, and hence their fields of view. Zoom lenses are ideal for applications that require the ultimate amount of flexibility during use and do not require high resolution; unless a field of view actively needs to change while imaging, it is likely not the best choice. When this is the case, stepper motors are required to change the focal length quickly and accurately. Manually changing the lens parameters will cause the imaging system to lose calibration as repeatability of adjustments will suffer.
Figure 2: A zoom lens at multiple optical magnifications.
Zoom lenses are specified as having particular zoom ratios, which can be found by dividing the longest focal length option by the smallest for any given lens. For example, if a zoom lens can vary between an 8mm and a 48mm focal length, it is said to be a 6X zoom lens (48mm/8mm = 6X). This can also be expressed as a ratio: for the aforementioned lens it would be a 6:1 zoom ratio.
Figure 2 shows the same zoom lens set to two different focal lengths. Unlike in fixed focal length lenses, both relative element spacing and distance to the image plane changes, despite the fact that the working distance has not changed. These complicated mechanics add to the cost of the lens system, as precise movements are required to simultaneously change the lens’s focal length and keep it in focus. It is also not possible for a zoom lens to have as high a resolution as in a comparably priced fixed focal length lens, as the complex mechanics and optical elements are multitasking. They are not only attempting to get the best performance at a single focal length, they are required to function over a broad range of focal lengths, which lowers the overall performance.
There are some other interesting optical properties that arise as a direct result of the complex movements in a zoom lens. Depending on how the lens was designed, f/# can change as the focal length is changed. This type of design is typically avoided for photography or videography lenses, but for machine vision lenses this is often not the case. It is also important to note that the working f/# will still change as the magnification changes, resulting in differences in image quality and saturation.
By definition, as zoom lenses change their field of view, they remain in focus. If a lens is defocused as its focal length is changed, it is more accurately referred to as a varifocal lens, not a zoom lens.
Macro lenses can be thought of as a subset of fixed focal length lenses, where the magnification is around 1X (the sensor is the same size as the object) or a bit greater, and the working distance is relatively small. Due to their high magnifications, macro lenses tend to run at an f/# that is generally around a factor of two larger than what is stated on their barrels. Often, typical fixed focal length lenses can be turned into macro lenses with the use of spacers or by reversing them such that they image backwards. See Figure 3 for a lens in macro configuration and the resulting image.
Figure 3: Macro lens inspecting a printed circuit board (above) and the resulting image (below)
Fixed Magnification Lenses
Telecentric lenses should be used any time a high accuracy measurement in a system needs to take place. They are highly specialized, fixed magnification lenses that come with many powerful optical capabilities, and their detailed working principles are beyond the scope of this article. Telecentric lenses excel at measurement when compared to standard fixed focal length lenses because they have no angular field of view, and therefore no parallax error; regardless of the distance from the lens, the magnification will not change. This means that telecentric lenses can measure parts incredibly accurately, even if there are part placement errors. (Much more detail on telecentric lenses can be found in the September 8, 2015 article “Straight and True: Telecentric Lenses for Metrology and Quality Assurance.”)
It is often thought that the selection of a telecentric lens is more challenging than that of a fixed focal length lens, though this is almost always not the case. The second part of this article will explain in detail how to select a telecentric lens.
Microscope objectives are used to image very small objects, generally with magnifications much greater than 1X. They are fixed magnification optics that only function properly at a single working distance, which is generally quite small relative to other imaging lenses. Microscope objectives should be used when a high magnification image is required and there are no strict minimum working distance constraints. Other than a few additional accessories, like a tube lens (if using an infinity corrected objective) and a tube, the selection process for a microscope objective is nearly identical to that of a telecentric lens.
Figure 4: Each microscope objective will have certain data printed on its side, explaining to the user what type of objective it is and what its optical properties are.
Objectives have various data written on their sides to describe certain optical properties of the objective, which gives the user clues on how to use it best. Figure 4 shows an image of a 20X optical magnification infinity corrected (infinite conjugate) microscope objective. It is designed for a 0 mm cover glass thickness and a 200 mm focal length tube lens, which is required to focus it. It has a numerical aperture of 0.42.
There are many different types of machine vision lenses to choose from, and each different type is useful for different applications. Fixed focal length lenses are useful for general machine vision, telecentric lenses are ideal for measurement, and microscope objectives are useful when the highest amount of detail is required.
Part 2 of this article will discuss how to narrow down the actual selection to the ideal lens for an application, once the type of lens has been chosen.