Lenses and distortion
A camera lens is an optical assembly of curved glass or plastic; it gathers, bends, and focuses light onto a camera’s digital sensor.
Focal length and field of view
Focal length sets magnification. For a given sensor, a shorter focal length gives a wider field of view (FOV) and smaller objects; a longer focal length narrows the FOV and fills the frame with distant detail. FOV depends on both focal length and sensor size, so the same lens gives a different FOV on a different sensor.
Angular resolution follows directly: spreading a fixed pixel count over a wider FOV means fewer pixels per degree.
Aperture and depth of field
The F-number (focal length over aperture diameter) sets how much light the lens passes and how much is in focus. A low f-number passes more light, which helps the exposure budget, but shrinks depth of field, so near and far objects cannot both be sharp. A high f-number deepens focus but starves the sensor and eventually softens the image through diffraction.
Distortion models
Lenses distort rays of light that pass through them. Lens-related deviations are modeled and removed before the image is used for geometry. OpenCV has a good tutorial: Understanding lens distortion.
- Radial distortion bends straight lines into barrels or pincushions, worst at the frame edge. The standard polynomial model uses coefficients k₁, k₂, k₃:
- Tangential distortion comes from a lens not parallel to the sensor, with coefficients p₁, p₂:
- Fisheye (equidistant) models very wide lenses, where the radial polynomial breaks down. OpenCV uses a separate four-coefficient fisheye model (k₁ to k₄); see the fisheye module. Above roughly 150° an omnidirectional or double-sphere model fits better.
- Rational polynomial adds denominator terms for wide lenses that are not quite fisheye.
The model has to match the lens. Forcing the standard radial model onto a fisheye leaves large residuals at the edge, which is exactly where obstacles first appear.