How to calculate the FOV in degrees from focal length or distance?
How does one to calculate the field of view (or angle of view) in degrees from the following details:
- sensor size (for example, 1")
- distance to target (for example, 7 feet)
- focal length (for example, 30mm)
@Unapiedra But, see the calculators -- many provide input fields and can work back from that.
@mattdm, picking the given data and working from them is trivial on paper. If you or OP wants to know how to do that on a web page, StackOverflow would be the place to ask.
In general, two out of the three details from the question are enough. My answer deals with one case but the other cases can be determined just as easily from the model.
The calculators you posted are for fairly standard, rectilinear lenses. This means you can use the Pinhole camera model to calculate the information.
This graphic fairly well shows what is going on:
On the horizontal axis you see
f. This is the focal length of the lens. Then, the arrow labeled Y1 is the image plane (where the sensor sits). If the sensor has the half-size of
y1, then the angle of the green line with the horizontal is half your field of view.
Basic geometry can give you the FOV:
FOV = 2 * arctan(y1 / f)
Mind two things:
y1is the half-size of your sensor. If you have a 1" sensor, the half-size would be 8mm (as mattdm pointed out in the comments), and your calculation would give you the FOV along the diagonal of the sensor. If you want it along the horizontal, then you need to calculate the width of the sensor and use that as the value for
#2 should not matter except for possible minor adjustment for FOV changing with focusing but the aspect ratio will have an impact. Also may want to specify if you are looking for horizontal FOV or diagonal
If I had the lens I would just go low tech and take a picture with an object of a known size. This will also take into account any other factors that may be in play. For example a lens like a fisheye lens may have a certain FOV on a full frame sensor, but if you have a smaller sensor you may not be able to easily calculate FOV with some simple formula due to distortion in the lens.