The Impact of a Lens’ Focal Length on a Vision System

Shared User Pr1acb6f6f144c400b8cd43c758d9509cd

The Impact of a Lens’ Focal Length on a Vision System

Selecting a lens for a vision system plays a crucial part in the overall behavior of the system. Not only will it dictate your field of view and depth of field, but it can also have implications on your machine vision algorithms and rules. Let’s explore the impact that the lens’s focal length can have on a system using machine vision.

Working Distance and Field of View Explained 

Lenses are often chosen under constraints surrounding their working distance and field of view. The selection process will generate a requirement for a lens to have a specific angular field of view, which is directly tied to the focal length of the lens. A larger angular field of view translates to a lens with a smaller focal length and conversely, a smaller angular field of view corresponds to a lens with a larger focal length.

Working Distance and Field of View

If flexibility exists with the working distance, greater importance should be placed on the selection of the lens’s focal length because it will have an impact on the apparent relative size between objects in the field of view. If a wide angle (small focal length) lens is used close to the working area there will be a larger difference between the apparent sizes of identical objects if they are at different distances from the imaging system. The inverse scenario experiences a smaller difference between apparent sizes when a higher focal length is used.

In Practice with a Machine Vision Application 

In the example below two identical bottles are separated by a distance of 20 cm from the camera along the axis of the working distance. They are imaged from varying distances and focal lengths to keep the field of view constant to illustrate the apparent difference in relative size of the objects. When the camera is 168 cm away from the farther bottle at the end of the measuring tape, there is a small apparent difference in size between both bottles. As the camera moves closer, the apparent size difference between the bottles grows.

Focal Length Comparison

The dashed red lines have been added to highlight the impact that the lens’s focal length has on the apparent size of the furthest bottle. Once the camera is at a distance of 70 cm from the furthest bottle, it seems to have reduced in size by roughly 20% from when the camera was at 168 cm away. The animated GIF below shows a transition between the leftmost and rightmost images from above to highlight the difference between a lens with a 25mm focal length and a lens with an 8mm focal length.

Focal Length Comparison 8 mm vs 25 mm

Either of these effects could be desired or unwanted, depending on the task of the machine vision application. If, for example, a system that is selecting parts that have a slight variation in distance from the lens, a larger working distance and focal length should be selected. This will reduce the variance between part sizes and generate less false rejections without tweaking the software tolerances. In a scenario where the height of an object is known and is used to determine its position relative to a 3D environment, a wider angle lens will give more precision when navigating along the axis of the working distance.

Recommendation: Experiment and Test 

When working constraints allow it, experimentation with lenses of varying focal lengths and varying working distances will provide the best information relative to your particular application. When designing a vision system, it is recommended to test all prospective equipment together as part of a complete system.

Lumenera’s integration engineers and Technical Assistance Center are great resources at your disposal when you are designing a vision system or run into problems and have questions. They don’t read from a script to help troubleshoot your issue. Rather, they listen to what you have to say and provide you with suggestions to help you reach a viable solution in a timely manner. If you have questions about an imaging system that you are currently designing, reach out.

Learn More 

To learn more about selecting a lens for a vision system, check out the Lumenera white paper: Getting it Right: Selecting a Lens for a Vision System.

And, sign up for our newsletter to automatically receive regular updates from Lumenera.

More in Buyer's Guides