Camera Projection and Pinhole Model
How a 3D world maps to a 2D sensor using the pinhole model and similar triangles.
A camera converts our three-dimensional world into a two-dimensional grid of pixels. This dimensional reduction is the foundational problem of computer vision.
To map 3D points mathematically, we use the Pinhole Camera Model. Light rays from an object pass through a tiny aperture (the pinhole) to form an inverted image on the sensor plane.
The focal length () is the distance between the pinhole and the sensor. A longer focal length produces a larger, "zoomed in" projection, while a shorter focal length creates a wider field of view.
Because light travels in straight lines, projection becomes a problem of similar triangles. The relationship between the object's real height at distance , and its projected pixel height at focal length , is a simple ratio.
This simple equation tells us something profound: depth () is inextricably linked to scale. An object appearing small on the sensor could be tiny and close, or huge and far away. We've lost one dimension entirely.