lens distortion
Lens distortion is the way real lenses bend the geometry that the ideal pinhole model promises to keep straight. The clearest symptom: straight lines in the world come out curved in the image, bowing outward near the center (barrel distortion, common on wide-angle and action cameras) or pinching inward (pincushion distortion, common on telephoto). The pinhole model has no such effect, so distortion is the leading correction you must add before any geometry can be trusted.
The dominant component is radial distortion, which displaces a point along the line from the image center by an amount that grows with its distance from the center r. A standard polynomial model multiplies the ideal normalized coordinates by (1 + k1 r^2 + k2 r^4 + k3 r^6 + ...), where the coefficients k1, k2, k3 are estimated during calibration; negative coefficients give pincushion, positive give barrel. A smaller tangential distortion, modeled by parameters p1 and p2, arises when the lens elements are not perfectly parallel to the sensor, shifting points slightly sideways. Together these few parameters explain most of the deviation of a real lens from a pinhole.
Correction (undistortion) inverts this model: for each output pixel you compute where its ray would have landed under distortion, sample the distorted image there, and so produce a geometrically clean image on which pinhole math applies. This is a required step in calibration, stereo, SLAM and photogrammetry — uncorrected distortion poisons triangulation and pose estimation. Strongly non-perspective lenses (fisheye, 360-degree) exceed the polynomial model's range and use dedicated models such as the equidistant or unified spherical projection. Note that lens distortion is geometric (it moves pixels) and is distinct from photometric defects like vignetting (darkening at the edges) or chromatic aberration (color fringing).
Order of operations is a frequent trap: distortion acts in normalized camera coordinates, before the intrinsic matrix K is applied. So the correct pipeline is project to normalized coordinates, apply the distortion polynomial, then multiply by K to get pixels. Applying distortion after K (in pixel space) is wrong and will not invert cleanly.