1 | initial version |

In the pin-hole camera model, *focal length* is the distance on the image-plane from the focal point of the camera. However, the units it is given in may differ from system to system.

Film cameras and lens, usually denote is in mm. The effective (pin-hole) FOV is measured relative to e.g. 35mm, the width of the film.

In this case, if the frame width is 35mm, and the distance is, say 30mm, then simple trigonometry gives you:

- If
*f=30mm*is the triangle height; - and taking half the width of the frame gives us a right-triangle with a base of
*w/2=35/2=17.5*; - Then if the angle at the top - half FOV - is
*a*, we get:*tan(a)=(w/2)/f=0.58333333*; - or
*a=30.256*=> The*FOV = 2a = 60.5 deg*

For digital cameras you can substitute the sensor width for 35mm.

In vision systems, the focal length is often calculated in pixels, so that the width is taken as the image width is pixels. If you know your sensor size in mm, you can easily convert between the two.

Obviously, if you know your FOV, you can reverse this simple calculation to get *f* in which ever units you know your width.

2 | No.2 Revision |

In the pin-hole camera model, *focal length* is the distance ~~on ~~of the image-plane from the focal point of the camera. However, the units it is given in may differ from system to system.

Film cameras and lens, usually denote ~~is ~~*f* in mm. The effective (pin-hole) FOV is measured relative to the width of the film, e.g. ~~35mm, the width of the film. ~~35mm.

In this case, if the frame width is 35mm, and the distance is, say 30mm, then simple trigonometry gives you:

- If
*f=30mm*is the triangle height; - and taking half the width of the frame gives us a right-triangle with a base of
*w/2=35/2=17.5*; - Then if the angle at the
~~top -~~top, half~~FOV -~~the FOV, is*a*, we get:*tan(a)=(w/2)/f=0.58333333*, or*a=30.256 deg*; ~~or~~The*a=30.256*=>*FOV = 2a = 60.5 deg*

For digital cameras you can substitute the sensor width for ~~35mm.~~the film width (35mm).

In vision systems, the focal length is often calculated in pixels, so that the width is taken as the image width ~~is ~~in pixels. If you know your sensor size in mm, you can easily convert between the two.

Obviously, if you know your FOV, you can reverse this simple calculation to get *f* in which ever units you know your width.

3 | No.3 Revision |

In the pin-hole camera model, *focal length* is the distance of the image-plane from the focal point of the camera. However, the units it is given in may differ from system to system.

Film cameras and lens, usually denote *f* in mm. The effective (pin-hole) FOV is measured relative to the width of the film, e.g. 35mm.

In this case, if the frame width is 35mm, and the distance is, say 30mm, then simple trigonometry gives you:

- If
*f=30mm*is the triangle height; - and taking half the width of the frame gives us a right-triangle with a base of
*w/2=35/2=17.5*; - Then if the angle at the top, half the FOV, is
*a*, we get:*tan(a)=(w/2)/f=0.58333333*, or*a=30.256 deg*; - The
*FOV = 2a = 60.5 deg*

For digital cameras you can substitute the sensor width for the film width (35mm).

In vision systems, the focal length is often calculated in pixels, so that the width is taken as the image width in pixels. If you know your sensor size in mm, you can easily convert between the two.

Obviously, if you know your FOV, you can reverse this simple calculation to get *f* in which ever units you know your width.

Copyright OpenCV foundation, 2012-2018. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.