Lens Distortion: Why Straight Lines Curve in Photos
Lens distortion makes straight lines appear curved in an image, a result of imperfect lens geometry. It's critical to correct in computer vision for tasks like 3D reconstruction, but is often ignored in regular photography.
WHY IT EXISTS Physical lenses are imperfect attempts to project a 3D scene onto a 2D sensor. Due to the shape of the glass elements, magnification can vary from the center of the lens to the edges. This causes a deviation from a perfect, rectilinear (straight-line) projection.
THE MENTAL MODEL Imagine taking a picture of a perfect grid of straight lines, like a checkerboard. With an ideal lens, the photo would be a perfect grid. With a real-world lens, that grid appears warped, as if stretched or squeezed, especially near the edges. Straight lines in the world are no longer straight lines in the image.
HOW IT WORKS Distortion is a geometric aberration that changes where light rays land on the sensor, not how sharp they are. The two most common types are barrel distortion, where straight lines bow outwards from the center (like a barrel), common in wide-angle lenses. The other is pincushion distortion, where lines curve inwards toward the center, common in telephoto lenses. Correcting this involves applying a mathematical transformation to the image to "un-warp" the pixels back to their ideal positions.
WHEN TO USE IT More accurately, when to correct for it. Correction is mandatory for any application that relies on measuring the real world from an image. This includes: first, robotic navigation, where a robot needs to accurately perceive distances and obstacles; second, photogrammetry, where multiple photos are stitched together to create 3D models; and third, any scientific measurement where image geometry must be precise.
WHEN NOT TO USE IT Correction is often unnecessary or even undesirable in casual or artistic photography. For example, the extreme barrel distortion of a fisheye lens is a desired creative effect. If an application only cares about object classification (e.g., "is there a car in this image?") and not the object's precise shape or location, distortion can often be ignored.
ONE CANONICAL EXAMPLE The standard method for correcting lens distortion is to photograph a checkerboard pattern. In the distorted image, the straight lines of the checkerboard will appear curved near the frame's edges. Computer vision algorithms can detect these curves, compare them to the known straight lines of the real pattern, and calculate the mathematical parameters needed to reverse the distortion for any future image taken with that lens and camera setup.
Read the original → en.wikipedia.org
Get five bites like this every day.
Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.