How do machine vision designers choose the right lens?
For machine vision system designers, the cost-performance trade-off when selecting a lens for a specific application becomes more complicated because there are many different types of lenses with different resolutions and different image distortion characteristics available on the market.
Fixed-focus lenses remain the mainstay of many machine vision systems due to their low cost; however, there are many other lens options on the market, including zoom, telecentric, 360° optical and liquid lens products, each with its own unique advantages in meeting specific applications.
Determine Focal Length
Before selecting any particular lens, its focal length must be determined. The choice of focal length depends on the resolution required for the imaging defect, the size of the object being imaged, and the distance of the object from the camera. The focal length in this context refers to the distance between the optical center of the lens and the camera's image sensor.
By changing the focal length of the lens, different sizes of field of view (FOV) can be obtained. Choosing the correct focal length of the lens depends on the working distance of the object from the camera/lens system, the required field of view and the size of the image sensor. The focal length of the lens can be determined by the following formula: Focal length = magnification × working distance / (1 + magnification) where magnification = sensor size / FOV.
Therefore, for the same working distance, a larger sensor size will produce a larger field of view.
When selecting a lens, the resolution of the lens must match the characteristics of the camera's image sensor.
To do this, it is important to understand the characteristics of the image sensor used in the camera. The resolution of a camera is determined by the pixel size of the image sensor, which can be calculated in line pairs per mm (lp/mm) as follows: 1000 (lp/mm) / 2 × pixel size (μm)
Fixed focus or zoom?
Fixed focus lenses are widely used in machine vision systems because they use fewer optical components, have low optical distortion, and are relatively inexpensive. However, in some applications, the field of view may need to change, especially when the system design may change over time, or when the system integrator needs to determine the appropriate focal length for a certain application. In this case, a zoom lens can be selected. Unlike a zoom lens, which maintains the focus position unchanged when the focal length changes, a zoom lens requires refocusing while allowing different fields of view to be imaged.
Enlarge
Although zoom lenses are not common in machine vision applications, they are often used in applications such as microscopy to provide manual or motor-controlled image magnification. Using such a zoom lens allows the operator to inspect parts at the desired magnification without having to change lenses, or to mount multiple lens types on a lens tray (which allows the magnification to be changed without removing or loading the lens). Using a zoom lens, the inspection system can be automated so that the system can be programmed to view the entire scene at low magnification and zoom in on specific details without having to change lenses or rotate the lens tray.
Telecentric Design
With traditional lenses, the closer an object is to the camera, the larger the image appears; the farther the object is from the camera, the smaller the image appears. This is a disadvantage in high-precision measurement applications because image processing software will measure the parameters of the part based on the captured image. To overcome this problem, system developers can use telecentric lenses so that they can obtain images of objects of the same size, regardless of the object's position in space.
The distance an object can move and still appear the same size after being imaged is called the magnified depth of field. The magnified depth of field is different from the image clarity depth of field, which is the depth of field we usually understand.
Compared to traditional lenses, telecentric lenses are usually larger and more expensive because they require more lens elements and the lens needs to be as large as the object being imaged. There are three types of telecentric lenses on the market today - object-space telecentric lenses, image-space telecentric lenses, and bi-telecentric lenses.
Although many manufacturers offer all three types of telecentric lenses, image-space telecentric lenses are more commonly used in image projection equipment and are less commonly used in machine vision. For example, in lithography systems, projection lenses are typical image-space telecentric lenses used to image lithography masks onto silicon wafers. The advantage of such image-space telecentric lenses is that they provide uniform light transmission across the field of view.
The most commonly used telecentric lenses in machine vision systems are object-side telecentric lenses and bi-telecentric lenses. Object-side telecentric lenses require fewer lens elements than bi-telecentric lenses and are therefore less expensive.
Object-side telecentric lenses are telecentric on the object side, while bi-telecentric lenses are telecentric on both the object and image sides, providing constant magnification even when the imager in the camera cannot always be in the exact position in the optical path. Such bi-telecentric lenses are often used with collimated backlight illuminators to ensure high contrast images for accurate image measurement.
Reduce camera costs
For applications such as beverage, pharmaceutical and cosmetic inspection, parts must be inspected at high speeds as they move along a conveyor. To do this, a system must be built that can image the sides, tops and even inside containers to detect defects. Of course, there are many different ways to accomplish this task.
This can be accomplished using multiple cameras to image the top and sides of the object. Here, multiple cameras, mounting brackets, and software calibration routines can be used. Alternatively, the object can be rotated around the field of view of a single line scan camera or area scan camera to capture a 360° image of the object. This approach requires more complex mechanical engineering because the object must be stopped, rotated, and inspected before a pass/fail decision can be made.
Electric focus
While conventional lenses can be used to image objects at different distances from the camera, if objects of different heights appear in the imaging system, the lens will need to be refocused. While manual focus adjustment can be performed on automated production lines, this requires resetting the camera for different focal lengths. Manual adjustment requires time to adjust, resulting in increased downtime; on the other hand, manual adjustment can be difficult if the camera and lens are mounted in hard-to-reach areas of the equipment.
Although currently available lenses can meet the needs of many machine vision applications, more specialized machine vision systems may require custom lenses and coatings.