# Understanding Focal Length and Field of View

This is **Section 1.3** of the Imaging Resource Guide

### Fixed Focal Length Lenses

A Fixed Focal Length Lens, also known as a conventional or entocentric lens, is a lens with a fixed Angular Field of View (AFOV). By focusing the lens for different working distances, differently sized Fields of View (FOV) can be obtained, though the viewing angle is held constant. AFOV is typically specified as the full angle (in degrees) associated with the horizontal dimension (width) of the sensor that the lens is to be used with.

**Note:** Fixed Focal Length Lenses should not be confused with Fixed Focus Lenses. Fixed Focal Length Lenses have the ability to be focused for different distances; Fixed Focus Lenses are intended for use at a single, specific working distance. Examples of Fixed Focus Lenses are many Telecentric Lenses and Microscope Objectives.

The focal length of a lens defines the lens’s angular field of view. For a given sensor size, the shorter the focal length, the wider the angular field of the lens. Additionally, the shorter the focal length of the lens, the shorter the distance needed to obtain the same FOV compared to a longer focal length lens. For a simple, thin convex lens, the focal length is the distance from the back of the lens to the plane of the image formed of an object placed infinitely far in front of the lens. From this definition, it can be shown that the angular field of view of a lens is related to the focal length (Equation 1), where f is the focal length in millimeters and h is the horizontal dimension of the sensor in millimeters (Figure 1).

**(1)**$$ \text{AFOV} \left[ ° \right] = 2 \times \tan ^{-1} { \left( \frac{h}{2f} \right)} $$

**Figure 1:** For a given Sensor Size, h, Shorter Focal Lengths produce Wider AFOV’s

In general, however, the focal length is measured from the lens’s rear principal plane, which is rarely located at the mechanical back of an imaging lens; this is one of the reasons that working distances calculated using paraxial equations are only approximations and the mechanical design of a system should only be laid out using data produced by computer simulation or data taken from lens specification tables. Paraxial calculations, as from lens calculators, are a good starting point to speed the lens selection process, but the numerical values produced should be used with caution.

When using Fixed Focal Length Lenses, there are three ways to change the field of view that the system (camera and lens). The first and often easiest option is to change the working distance from the lens to the object; moving the lens farther away from the object plane increases the field of view. The second option is to swap out the lens that is being used with one of a different focal length. The third option is to change the size of the sensor that is being used; a larger sensor will yield a larger field of view for the same working distance, as defined in Equation 1.

While it may often be convenient to have a very wide angular field of view, there are some negatives to consider. First, the level of distortion that is associated with some short focal length lenses can greatly influence the actual AFOV and can cause variations in the angle with respect to Working Distance (WD) due to the varying magnitude of the distortion. Next, short focal length lenses generally struggle to obtain the highest level of performance when compared against longer focal length options (see Best Practice #3). Additionally, short focal length lenses can have difficulties covering medium to large sensor sizes which can limit their usability, as discussed in Sensor Relative Illumination, Roll Off and Vignetting.

Another way to change the field of view of a system is to use either a Vari-Focal Lens or a Zoom Lens; these types of lenses allow for the adjustment of their focal lengths and thus have variable angular fields of view. Vari-Focal and Zoom Lenses often have drawbacks in terms of size and cost in comparison to Fixed Focal Length Lenses, and often cannot offer the same level of performance as Fixed Focal Length Lenses.

### Using WD and FOV to Determine Focal Length

In many applications, the required distance from an object and the desired field of view (typically the size of the object with additional buffer space) are known quantities. This information can be used to directly determine the required angular field of view via the formulas shown in Equation 2, where WD is the Working Distance from the lens and AFOV is the Angular Field of View. Equation 2 is the equivalent of finding the vertex angle of a triangle with its height equal to the working distance and its base equal to the horizontal field of view, as shown in Figure 2. **Note:** In practice, the vertex of this triangle is rarely located at the mechanical front of the lens, from which working distance is measured, and should only be used as an approximation unless the entrance pupil location is known.

**(2)**\begin{align} \text{AFOV} \left[ ° \right] & = 2 \times \tan ^{-1} \left( \frac{\text{Horiztontal FOV} \left[ \text{mm} \right] }{2 \, \times \, \text{WD} \left[ \text{mm} \right] } \right) \\ \\ \text{ or } \\ \\ \text{Horizontal FOV} \left[ \text{mm} \right] & = 2 \, \times \, \text{WD} \left[ \text{mm} \right] \times \tan \left( \frac{ \text{AFOV} \left[° \right] }{2} \right) \\ \end{align}

**Figure 2:** Relationship between HFOV, Sensor Size and WD for a given Angular FOV

Once the required AFOV has been determined, the focal length can be approximated using Equation 1 and the proper lens can be chosen from a lens specification table or datasheet by finding the closest available focal length with the necessary angular field of view for the sensor being used.

The 14.25° derived in Example 1 can be used to determine the lens that is needed, but the sensor size must also be chosen. As the sensor size is increased or decreased it will change how much of the lens’s image is utilized; this will alter the AFOV of the system and thus the overall FOV. The larger the sensor, the larger the obtainable AFOV for the same focal length. For example, a 25mm lens could be used with a ½" (6.4mm horizontal) sensor or a 35mm lens could be used with a 2/3” (8.8mm horizontal) sensor as they would both approximately produce a 14.5° angular FOV on their respective sensors.

Alternatively if the sensor has already been chosen, the focal length can be determined directly from the FOV and WD by substituting Equation 1 in Equation 2, as shown in Equation 3, where, h is the horizontal sensor dimension (number of horizontal pixels multiplied by the pixel size) and f is the focal length of the lens, both in millimeters; the FOV and WD must be measured in the same unit system. As previously stated, some amount of flexibility to the system’s working distance should be factored in, as the above examples are only first-order approximations and they also do not take distortion into account.

**(3)**$$ f = \left( \frac{h \, \times \, \text{WD} }{\text{Horizontal FOV}} \right) $$

### Calculating FOV Using a Lens with a Fixed Magnification

Generally, lenses that have fixed magnifications have fixed or limited working distance ranges. While using a Telecentric or other Fixed Magnification Lens can be more constraining, as they do not allow for different fields of view by varying the working distance, the calculations for them are very direct, as shown in Equation 4.

**(4)**$$ \text{Horizontal FOV} \left[ \text{mm} \right] = \frac{ \text{Horizontal Sensor Size} \left[ \text{mm} \right] }{\text{PMAG}} $$

Since the desired FOV and sensor are often known, the lens selection process can be simplified by restructuring Equation 4 into Equation 5.

**(5)**$$ {\text{PMAG}} = \frac{ \text{Horizontal Sensor Size} \left[ \text{mm} \right] }{\text{Horizontal FOV} \left[ \text{mm} \right] } $$

If the required magnification is already known and the working distance is constrained, Equation 3 can be rearranged (replacing h/FOV with magnification) and used to determine an appropriate fixed focal length lens, as shown in Equation 6.

**(6)**$$ {\text{PMAG}} = \frac{\text{FL}}{\text{WD}} $$

Be aware that Equation 6 is an approximation and will rapidly deteriorate for magnifications greater than 0.1 or for short working distances. For magnifications beyond 0.1, either a Fixed Magnification Lens or computer simulations (e.g. Zemax) with the appropriate lens model should be used. For the same reasons, lens calculators commonly found on the internet should only be used for reference. When in doubt, consult a lens specification table.

**Note:** Horizontal FOV is typically used in discussions of FOV as a matter of convenience, but the sensor aspect ratio (ratio of a sensor’s width to its height) must be taken into account to ensure that the entire object fits into the image (Equation 7), where the aspect ratio is used as a fraction (e.g. 4:3 = 4/3). While most sensors are 4:3, 5:4 and 1:1 are also quite common. This distinction in aspect ratio also leads to varying dimensions of sensors of the same sensor format. All of the equations used in this section can also be used for vertical FOV as long as the sensor’s vertical dimension is substituted in for the horizontal dimension specified in the equations.

**(7)**$$ \text{Horizontal FOV} = \text{Vertical FOV} \, \times \, \text{Aspect Ratio} $$

## LENS FOCAL LENGTH EXAMPLES

### Using WD and FOV to Determine Focal Length

**Example 1:** For a system with a desired working distance of 200mm and a horizontal FOV of 50mm, what is the Angular Field of View (AFOV)?

### Calculating FOV Using a Lens with a Fixed Magnification

**Example 2:** For an application using a ½" sensor, which has a horizontal sensor size of 6.4mm, a horizontal FOV of 25mm is desired.

**(1)**\begin{align} \text{PMAG} & = \frac{6.4 \text{mm}}{25 \text{mm}} \\ \text{PMAG} & = 0.256 \text{X} \\ \end{align}

By reviewing a list of Fixed Magnification or Telecentric Lenses, a proper magnification can be selected. Note: As the magnification increases, the size of the field of view will decrease; a magnification that is lower than what is calculated is usually desirable so that the full field of view can be visualized. In the case of Example 2, a 0.25X lens is the closest common option, which yields a 25.6mm FOV on the same sensor.