You’re absolutely right that real cameras use lenses, which introduce complexities beyond the idealized pinhole model. However, the pinhole model remains foundational because it captures the core geometric principles of image formation, while lens distortions are treated as secondary effects that can be modeled and corrected. Here’s a detailed breakdown of how this works:
1. The Pinhole Model as a Linear Basis
The pinhole model provides a linear projection framework that mirrors the geometric behavior of real cameras, even with lenses. Here’s why:
- Central Projection: Both pinhole and lens-based cameras rely on the principle of central projection, where each 3D point in the scene is projected onto the image plane via a straight line (ray) passing through the camera’s optical center (the nodal point of the lens system).
- Focal Length: The focal length in the pinhole model corresponds to the lens’s focal length, which determines the magnification and field of view. The intrinsic parameters (focal length, principal point, aspect ratio) in the pinhole model directly map to real cameras.
- Linear Equations: The core projection equations of the pinhole model (e.g., ( x = f \cdot X/Z ), ( y = f \cdot Y/Z )) describe how 3D points are projected onto the 2D image plane, assuming a distortion-free linear relationship. These equations form the basis for camera calibration and 3D reconstruction.
2. How Lenses Introduce Nonlinear Distortions
Real lenses deviate from the ideal pinhole model due to aberrations (imperfections in the lens design):
- Radial Distortion: Light rays bend unevenly as they pass through the lens, causing straight lines in the 3D scene to appear curved in the image (e.g., "barrel" or "pincushion" distortion).
- Tangential Distortion: Caused by misalignment between the lens and image sensor, leading to asymmetrical warping.
- Other Effects: Chromatic aberration, depth of field, and vignetting also affect image quality but are typically handled separately (e.g., via color calibration or post-processing).
3. Modeling and Correcting Distortions
To reconcile real cameras with the pinhole model, we:
- Calibrate the Camera:
- First, estimate the intrinsic parameters (focal length, principal point) using the pinhole model.
- Then, measure distortion coefficients (e.g., radial and tangential terms) by observing how real images deviate from the ideal projection.