简体   繁体   中英

Calculating camera angle of view

I know the formula to calculate a camera's angle of view given the film size and the focus distance. Ie, 35mm film at 50mm focal length. It works just fine returning the AOV.

Formula in python:

d = 35 # Film Width
f = 50 # Focal Length
aov = 2 * math.atan(float(d) / (2*float(f)))

which results in an AOV of 38.58

My question is how would I calculate the Focal Length f given the film size d and the aov?

You can calculate the focal length with:

f = d / (2 * math.tan(0.5 * aov))

This is derived from the theorem of intersecting lines and the tangents in right-angled triangles:

1

(0.5 * d)/f = a/b = tan(0.5 * aov)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM