Focal length and field of view
The sensor has a fixed size . The farther it is behind the center of projection, the narrower the cone of rays that reaches it. The angular field of view is
with and in the same units. For a given sensor size, a shorter focal length gives a wider field of view: a 24 mm high sensor sees 27° vertically with mm and 90° with mm. The horizontal field of view uses the sensor width instead. In the camera matrix , is measured in pixels: the focal length in mm divided by the pixel size, as in the pinhole camera demo.
Perspective projection
With the camera at the origin and the principal point at , perspective projection is
Every point is divided by its own depth: far objects look small, and parallel lines meet at vanishing points. In the side view, every projection ray passes through the camera center. On the real sensor behind the center the image is upside down, ; as in the pinhole camera demo, the matrices here describe the upright image on a virtual plane in front of it.
Weak perspective (scaled orthographic)
If the object's dimensions are small compared to its distance from the camera, all its points have about the same depth. Weak perspective replaces every depth by one reference depth , here the distance of the subject:
Now : the object is projected parallel to the optical axis onto the plane and then scaled as a whole. The mapping is linear, parallel lines stay parallel, and a point at depth is placed with a relative error of about . The object as a whole still gets smaller when it moves away, because grows with its distance.
Orthographic projection
Orthographic or parallel projection is the limit where the center of projection is infinitely far from the image plane. All projection rays are parallel to the optical axis:
so , and the depth has no effect at all, not even the depth of the object as a whole. The last row must be : with , would be again, which is perspective projection with . Weak perspective is orthographic projection followed by a uniform scaling by .
The dolly zoom
An object of size at distance appears pixels tall. Moving the camera away while zooming in with keeps the subject the same size, but everything behind it changes: the background grows and seems to move closer, a trick known from film. As grows, the depth differences within the scene become small compared to , and perspective projection turns into weak perspective. This is why long telephoto shots from far away look “flat”.
Try this
- Halve from 50 mm to 25 mm. The vertical AFOV grows from 27° to 51°, not to 54°, because of the arctangent.
- Set mm: , and the AFOV is exactly 90°.
- Switch on the dolly zoom and increase from 8 m to 40 m. The cube keeps its size, and the rows of pillars look compressed.
- Now compare with weak perspective at m and at m. Far away, the dashed image is much closer to the solid one, and it matches best near the subject, where is small.
- Dolly in to 3 m: the wide angle stretches the rows of pillars far into the distance.
- Choose weak perspective: the rows of pillars no longer converge, and all pillars have the same size. The panel shows for every point.
- Choose orthographic and change and : the image does not change at all.
- Pick the farthest pillar as the point and compare and for the three models.