# Celestial Programming : Camera Field of View Computation

The diagram below shows a pinhole lens with an image on the left and a sensor on the right. All photons from the scene converge at the pinhole, and continue in a striaght line to the sensor. The field of view the sensor can see is determined by the right triangle formed from the edge of the sensor, the center of the lens, and the center of the sensor. The focal length is the distance between the lens and the sensor. The units used to measure the focal length and sensor size are up to the reader, but millimeters is normally used, and the same units must be used for both the sensor size and focal length.

To compute the field of view of a camera for a given lens or telescope:

\begin{align*} \theta = 2 \tan^{-1} \left( \frac{Sensor Size/2}{Focal Length} \right) \end{align*} Where $$\theta$$ is the field of view in degrees.

 Sensor Size: mm Focal Length: mm Field Of View:


Table of FOVs. Columns are sensor size and rows are focal lengths. A full frame DSLR is 35mm, and the common crop sensors for Canon and Nikon are 22mm and 24mm respectively.