Wednesday, September 16, 2015

Imaging Basics - Calculating Lens Focal length

In any industrial imaging application, we have the task of selecting several main components to solve the problem at hand.  The first being an industrial camera and second,  a lens to acquire the given image.  In many cases, our working distance of our lens is constrained and may have to mount the camera closer or further from the object plane.  Once set, this defines our working distance (WD) for the lens.  In addition, we have a given field of view (basically the dimension across the image) of the desired object.  


In order to select the correct focal length lens which is denoted in millimeters (i.e 25mm focal length), we need additional information on the camera sensor.  Camera sensors come in various "Image formats".  The chart below indicates some common formats which relate to the sensor size.  The sensor size can be found on the actual sensor datasheets if not available in a given chart.  



For this exercise, we want to image an object that is 400mm from the front of the lens to the object and desire a field of view of 90mm.  

We have selected a camera with the Sony Pregius CMOS IMX174 sensor.  This uses a 1/1.2" format which measures 10.67mm x 8mm.  


We have the following known values at this point: 

Field of View (FOV)  =  90mm
Working Distance (WD) = 400mm   
Sensor Size = 10.67mm - We will calculate for a 90mm horizonal FOV, in turn use the horizontal sensor dimension

The basic formula to calculate the lens focal length is as follows: 

FL = (Sensor size * WD) / FOV

Using the values from our application, 

FL = ( 10.67mm * 400mm ) / 90mm 
FL = 47.4mm

Lenses are only available off the shelf in various focal lengths (i.e 25mm, 35mm, 50mm), so this calculate is theoretical and may need an iteration to adjust working distance. Alternatively, if your application can have a slightly smaller or larger FOV, the closest focal length lens to your calculation may be suitable.


1st Vision has made calculating your lens focal length a bit easier!  As in engineering, its good to know the background formulas, but in practicality, like to simplify life with tools

You will find our lens calculator HERE.  Alternatively as select a camera, you will find an icon to the right which will automatically populate the calculator.  Below is a short video showing how to use this resource from the camera pages.  






A few additional considerations when selecting a lens:
  • Lenses have minimum working distances (MOD), so this should be considered when reviewing a lens setup.  MOD's can be found on the lens page for the given lenses.
  • Lenses need to be paired with the appropriate sensor.  For example, if you have a 1/2" sensor, you need to ensure you are using a 1/2" format lens or larger.
  • In selecting a lens, you need to ensure the lens has enough resolution (in lp/mm) to resolve the pixels on your camera.  Be sure to review this data carefully once you ID the desired focal length.  Demystifying lens specifications provides further understanding. 



Related Blogs: 
Demystifying Lens Specifications
Understanding Lens MTF
Calculating Resolution for Machine vision


Contact us to discuss your application and help make a recommendation!  1st Vision can provide a complete solution including lenses, cables and lighting. 

www.1stvision.com  
Ph:  978-474-0044
Do not forget to follow us on social media!

     https://www.facebook.com/pages/1st-Vision/944658058935262?fref=ts             

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.