Most machine vision applications use lenses with a fixed focal length. With these lenses, there is a defined relationship between focal length, working distance and field of view. Once the optical setup has been selected, these parameters remain predictable and reproducible.
A zoom lens works differently because its focal length can be adjusted. This makes it possible to change the field of view without changing the camera position, which can be particularly useful in test setups or applications where the camera mounting position is already fixed. For high-precision industrial inspection, however, a zoom lens is not always the best choice.
Field of view and working distance with a fixed focal length lens
With a fixed focal length lens, the focal length itself cannot be changed. The resulting field of view, or FOV, is determined by several parameters within the optical setup. The most important factors are:
the camera sensor size;
the focal length of the lens;
the working distance between the lens and the object.
This type of lens normally provides two adjustments. The aperture controls the amount of light reaching the camera sensor and also affects the available depth of field. The focus ring is used to bring the image into sharp focus at the selected working distance.
If a larger field of view is required while using the same camera and lens, the working distance normally has to be increased. As a result, the object is projected onto a smaller area of the camera sensor. Each pixel then represents a larger area on the object, reducing the object-side pixel resolution.
To obtain a smaller field of view and a higher pixel resolution, the camera is moved closer to the object. This increases the number of pixels available for a given feature or defect. The adjustment is only possible if the minimum working distance and focusing range of the lens allow it.
One of the main advantages of a fixed focal length lens is repeatability. As long as the camera position, working distance and lens settings remain unchanged, the field of view and pixel resolution also remain constant. This provides a stable optical basis for inspection and measurement applications.
How does a zoom lens work?
In addition to aperture and focus adjustment, a zoom lens provides a third adjustment. The zoom ring changes the focal length of the lens. This allows the optical magnification and field of view to be adjusted mechanically.
As a result, the field of view can be made larger or smaller while maintaining the same working distance. There is no need to reposition the camera to achieve this change. This is one of the main practical advantages of a zoom lens during setup and testing.
Changing the zoom setting affects several optical parameters at the same time. These parameters are directly related to the scale of the image projected onto the camera sensor. They include:
the effective focal length;
the field of view;
the magnification;
the object-side pixel resolution.
After changing the zoom setting, the lens may need to be refocused. Whether this is necessary depends on the optical and mechanical design of the lens. It is therefore important to verify focus whenever the zoom position is changed.
How does a zoom lens affect pixel resolution?
Pixel resolution indicates how much of the object is represented by a single camera pixel. For the horizontal direction, it is calculated by dividing the width of the field of view by the number of horizontal pixels on the camera sensor. The result is normally expressed in millimetres per pixel.
Pixel resolution = field of view ÷ number of pixels
For example, consider a camera with 2,448 horizontal pixels and a horizontal field of view of 100 mm. Each camera pixel then represents a specific width on the object. The resulting pixel resolution is:
100 mm ÷ 2,448 pixels = 0.0408 mm per pixel
If the horizontal field of view is reduced to 50 mm using the same camera and zoom lens, the number of available camera pixels remains unchanged. The same 2,448 pixels are now distributed across a smaller area of the object. The resulting pixel resolution becomes:
50 mm ÷ 2,448 pixels = 0.0204 mm per pixel
The area represented by each pixel has therefore been reduced from 0.0408 to 0.0204 mm per pixel. A feature of the same physical size will now be represented by twice as many pixels, providing more image information for inspection. The trade-off is that the camera now covers only half of the original field of view.
This is why the zoom setting in an inspection system should not be changed without considering the consequences. A change in field of view also changes the relationship between pixels and physical dimensions in millimetres. Any inspection parameters that depend on image scale may therefore need to be adjusted or recalibrated.
Using a zoom lens in a test setup
When building a machine vision test setup, the required field of view, working distance and pixel resolution are not always known in advance. A zoom lens makes it possible to evaluate different optical configurations without repeatedly replacing the lens or repositioning the camera. This can significantly simplify the initial feasibility and evaluation process.
The camera can first be mounted at a practical working position. The required field of view can then be adjusted using the zoom ring, after which focus can be fine-tuned. This makes it possible to determine during testing which combination of field of view, working distance and pixel resolution is most suitable for the application.
For this reason, zoom lenses can be useful in many development and evaluation environments. They provide flexibility at a stage where the final optical parameters have not yet been fixed. Typical applications include:
feasibility studies;
machine vision demonstrations;
laboratory setups;
determining the appropriate focal length;
temporary camera installations;
testing different product sizes.
Once the final field of view and working distance have been established, the optical requirements are much better defined. A fixed focal length lens with the appropriate focal length can then be selected for the final installation. This provides greater repeatability while retaining the optical configuration established during testing.
Why a zoom lens is not always suitable for industrial inspection
In an industrial environment, cameras and lenses can be exposed to vibration, mechanical shock and temperature changes. Under these conditions, the focus, aperture or zoom ring may gradually shift if the adjustment rings are not securely locked. Even a relatively small change can affect the optical configuration of the inspection system.
A change in the zoom setting is particularly critical because it affects both the field of view and the pixel resolution. The inspection software will then be working with a different image scale from the one used during the original setup or calibration. This can directly influence measurements, detection zones and defect thresholds.
Depending on the inspection, a change in image scale can have several consequences. Some may immediately cause rejected measurements, while others can result in more subtle changes in detection performance. Typical effects include:
dimensional measurements no longer correspond to the calibrated values;
regions of interest are no longer positioned correctly;
pixel-based tolerances represent different physical dimensions;
small defects are represented by more or fewer pixels;
the inspection must be set up and calibrated again.
Many industrial zoom lenses are therefore equipped with locking screws that secure the adjustment rings once the correct settings have been established. Some lenses provide multiple locking points for each adjustment ring to improve mechanical stability. These features reduce the risk of accidental changes during operation.
Locking screws significantly reduce the likelihood of unintended adjustment, but they cannot completely eliminate the additional mechanical sensitivity introduced by the zoom mechanism. In practice, the zoom setting remains a more critical parameter than focus or aperture when the image scale must remain constant. For inspection systems requiring a fixed and repeatable pixel resolution, a fixed focal length lens is therefore usually preferred.
When is a zoom lens a suitable choice?
Not every camera application involves high-precision industrial inspection. In some situations, the ability to adjust the field of view is more important than maintaining an exactly reproducible object-side pixel resolution. For these applications, a zoom lens can provide useful flexibility without requiring changes to the mechanical camera position.
A zoom lens can therefore be a practical solution when flexibility during installation or operation is required. The key consideration is whether a small change in image scale would affect the performance of the application. Typical situations include applications where:
the camera mounting position is already fixed;
the required field of view can only be determined during installation;
several fields of view need to be evaluated;
the camera is used for observation or monitoring;
no high-accuracy dimensional measurements are performed in the image;
small changes in pixel resolution do not affect the application.
Examples include process monitoring, observation systems and certain sports analysis applications. In a golf swing analysis setup, for example, the camera mounting position is often determined by the available space around the player. The zoom setting can then be used to frame the required part of the swing area without moving the camera.
One lens that can be used for this type of application is the Kowa LMVZ4411 zoom lens. This C-mount lens provides an adjustable focal length from 4.4 to 11 mm. The field of view can therefore be adapted while the camera remains in a fixed mounting position.
Zoom lens or fixed focal length lens?
The most suitable lens depends on the application and the required level of accuracy. Optical flexibility and measurement repeatability do not always have the same priority. The intended use of the camera should therefore determine which type of lens is selected.
A fixed focal length lens is usually the preferred choice when constant pixel resolution, a fixed image scale and reproducible inspection results are important. Once the camera, lens and working distance have been set, the optical geometry remains stable. This makes fixed focal length lenses particularly suitable for automated inspection and measurement systems.
A zoom lens is useful when the field of view needs to remain adjustable during testing, commissioning or installation. This is particularly valuable for demonstrations, feasibility studies, monitoring applications and sports analysis. Once the final optical requirements are known, it may still be preferable to replace the zoom lens with an appropriately selected fixed focal length lens.
For high-accuracy dimensional measurement, a telecentric lens may be required instead. A telecentric optical design minimises perspective-related measurement errors and keeps magnification nearly constant when the object position changes slightly in height. Telecentric lenses are commonly used for measuring diameters, holes, edges and other critical dimensions where conventional perspective imaging would introduce unacceptable variation.
Selecting the right machine vision lens
Selecting a suitable lens requires at least the camera sensor size, the required field of view and the available working distance. For inspection applications, the size of the smallest defect or feature must also be considered together with the number of pixels required to detect it reliably. These parameters determine the object-side resolution that the optical system needs to achieve.
Based on this information, the required focal length and optical resolution can be calculated. It is not enough for the complete object simply to fit within the camera image. Relevant defects, edges and other features must also be represented by enough pixels and sufficient contrast to allow reliable detection or measurement.
When an application involves more than simply selecting a camera and lens, other parts of the imaging system also become important. Illumination, mechanical design, triggering and control, and image-processing software all influence the reliability of the final inspection. Read more about designing and implementing a machine vision system.