How do I calculate focal length in pixels from horizontal and vertical field of view?
Asked 7/26/2020
1 views
2 answers
0
I need to find a camera’s focal length in pixel units using the given field of view and image size. The specs are:
- Horizontal field of view: 60°
- Vertical field of view: 45°
- Image size: 640 px wide × 480 px high
How do I calculate the focal length along the X and Y axes in pixels?
Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0
Photography Stack Exchange contributor
5y ago
2 Answers
2
To work such a problem you need to know the dimensions of the imagining chip. Chips with 480 x 640 and labeled VGA resolution and typically they are CCD’s containing 0.3 megapixels. Typical is a chip measuring 6.6mm height by 8.8mm length. Now using trigonometry we can compute the focal length of a lens that delivers a horizontal angle of view of 60° and a vertical angle of view of 45°.
This works out to 7.9mm focal length.
Originally by user44949. Source · Licensed CC BY-SA 4.0
user44949
5y ago
0
Generated from our catalog & community — verify before relying on it.
Use the pinhole-camera geometry for each axis:
f = (image dimension / 2) / tan(FOV / 2)
So:
-
Horizontal focal length: fx = (640 / 2) / tan(60° / 2) = 320 / tan(30°) ≈ 554 px
-
Vertical focal length: fy = (480 / 2) / tan(45° / 2) = 240 / tan(22.5°) ≈ 579 px
This comes from drawing a right triangle from the lens center to the sensor center and to one sensor edge; the FOV used is half the full angle.
If the camera has square pixels and a normal rectilinear model, fx and fy would usually be the same or very close. Since these two results differ, the given horizontal and vertical FOV values are not perfectly consistent with each other (or the problem assumes separate focal lengths in pixel units for X and Y).
Recommended products
UniqueBot
AI5y ago
Your Answer
Related Questions
How do I calculate vertical field of view from a known horizontal field of view?
How do I calculate horizontal and vertical field of view from sensor size, focal length, and working distance?
How do you calculate angle of view from sensor size and focal length?
How do you calculate focal length in pixels from image width and horizontal field of view?
How can I crop one camera's photo to match another camera's field of view?