Neljapäev, august 06, 2026

Ajalugu

TÄNA AJALOOS, 28. juuli ⟩ Hiinas toimus 20. sajandi suurim maavärin

In geometric optics, distortion is a deviation from rectilinear projection; a projection in which straight lines in a scene remain straight in an image. It is a form of optical aberration that may be distinguished from other aberrations such as spherical aberration, coma, chromatic aberration, field curvature, and astigmatism in a sense that these impact the image sharpness without changing an object shape or structure in the image (e.g., a straight line in an object is still a straight line in the image although the image sharpness may be degraded by the mentioned aberrations) while distortion can change the object structure in the image (so named as distortion).

Radial distortion

Barrel distortion
Barrel
Pincushion distortion
Pincushion
Mustache distortion
Mustache
Examples of radial distortions

Although distortion can be irregular or follow many patterns, the most commonly encountered distortions are radially symmetric, or approximately so, arising from the symmetry of a photographic lens. These radial distortions can usually be classified as either barrel distortions or pincushion distortions.[1]

Software correction

With uncorrected barrel distortion (at 26mm)
Barrel distortion corrected with software (this is the ENIAC computer)

Radial distortion, whilst primarily dominated by low-order radial components,[3] can be corrected using Brown's distortion model,[4] also known as the Brown–Conrady model based on earlier work by Conrady.[5] The Brown–Conrady model corrects both for radial distortion and for tangential distortion caused by physical elements in a lens not being perfectly aligned. The latter is also known as decentering distortion. See Zhang[6] for additional discussion of radial distortion. The Brown-Conrady distortion model is

where

  • is the distorted image point as projected on image plane using specified lens;
  • is the undistorted image point as projected by an ideal pinhole camera;
  • is the distortion center;
  • is the radial distortion coefficient;
  • is the tangential distortion coefficient; and
  • , the Euclidean distance between the distorted image point and the distortion center.[3]

Barrel distortion typically will have a negative term for whereas pincushion distortion will have a positive value. Mustache distortion will have a non-monotonic radial geometric series where for some the sequence will change sign.

To model radial distortion, the division model[7] typically provides a more accurate approximation than Brown-Conrady's even-order polynomial model,[8]

using the same parameters previously defined. For radial distortion, this division model is often preferred over the Brown–Conrady model, as it requires fewer terms to more accurately describe severe distortion.[8] Using this model, a single term is usually sufficient to model most cameras.[9]

Software can correct those distortions by warping the image with a reverse distortion. This involves determining which distorted pixel corresponds to each undistorted pixel, which is non-trivial due to the non-linearity of the distortion equation.[3] Lateral chromatic aberration (purple/green fringing) can be significantly reduced by applying such warping for red, green and blue separately.

Distorting or undistorting requires either both sets of coefficients or inverting the non-linear problem which, in general, lacks an analytical solution. Standard approaches such as approximating, locally linearizing and iterative solvers all apply. Which solver is preferable depends on the accuracy required and the computational resources available.

In addition to usually being sufficient to model most cameras, as mentioned, the single-term division model has an analytical solution to the reverse-distortion problem.[8] In this case, the distorted pixels are given by

where , the Euclidean distance between the undistorted image point and the undistortion/distortion center.

Calibrated

Calibrated software works from a table of lens/camera transfer functions:

  • Adobe Photoshop Lightroom and Photoshop CS5 can correct complex distortion.
  • PTlens is a Photoshop plugin or standalone application which corrects complex distortion. It not only corrects for linear distortion, but also second degree and higher nonlinear components.[10]
  • Lensfun is a free to use database and library for correcting lens distortion.[11][12]
  • OpenCV is an open-source BSD-licensed library for computer vision (multi-language, multi-OS). It features a module for camera calibration.[13]
  • DxO's PhotoLab software can correct complex distortion, and takes into account the focus distance.
  • proDAD Defishr includes an Unwarp-tool and a Calibrator-tool. Due to the distortion of a checkerboard pattern, the necessary unwrap is calculated.
  • The Micro Four Thirds system cameras and lenses perform automatic distortion correction using correction parameters that are stored in each lens's firmware, and are applied automatically by the camera and raw converter software. The optics of most of these lenses feature substantially more distortion than their counterparts in systems that do not offer such automatic corrections, but the software-corrected final images show noticeably less distortion than competing designs.[14]

Manual

Manual software allows manual adjustment of distortion parameters:

  • ImageMagick can correct several distortions; for example the fisheye distortion of the popular GoPro Hero3+ Silver camera can be corrected by the command[15]
    convert distorted_image.jpg -distort barrel "0.06335 -0.18432 -0.13009" corrected_image.jpg
  • Photoshop CS2 and Photoshop Elements (from version 5) include a manual Lens Correction filter for simple (pincushion/barrel) distortion
  • Corel Paint Shop Pro Photo includes a manual Lens Distortion effect for simple (barrel, fisheye, fisheye spherical and pincushion) distortion.
  • GIMP includes manual lens distortion correction (from version 2.4).
  • PhotoPerfect has interactive functions for general pincushion adjustment, and for fringe (adjusting the size of the red, green and blue image parts).
  • Hugin can be used to correct distortion, though that is not its primary application.[16]

Besides these systems that address images, there are some that also adjust distortion parameters for videos:

  • FFMPEG using the "lenscorrection" video filter.[17]
  • Blender by using the node editor to insert a "Distort/Lens Distortion" node between the input and output nodes.

Perceived distortion (perspective distortion)

Radial distortion is a failure of a lens to be rectilinear: a failure to image lines into lines. If a photograph is not taken straight-on then, even with a perfect rectilinear lens, rectangles will appear as trapezoids: lines are imaged as lines, but the angles between them are not preserved (tilt is not a conformal map). This effect can be controlled by using a perspective control lens, or corrected in post-processing.

Due to perspective, cameras image a cube as a square frustum (a truncated pyramid, with trapezoidal sides) – the far end is smaller than the near end. This creates perspective, and the rate at which this scaling happens (how quickly more distant objects shrink) creates a sense of a scene being deep or shallow. This cannot be changed or corrected by a simple transform of the resulting image, because it requires 3D information, namely the depth of objects in the scene. This effect is known as perspective distortion; the image itself is not distorted but is perceived as distorted when viewed from a normal viewing distance.

Note that if the center of the image is closer than the edges (for example, a straight-on shot of a face), then barrel distortion and wide-angle distortion (taking the shot from close) both increase the size of the center, while pincushion distortion and telephoto distortion (taking the shot from far) both decrease the size of the center. However, radial distortion bends straight lines (out or in), while perspective distortion does not bend lines, and these are distinct phenomena. Fisheye lenses are wide-angle lenses with heavy barrel distortion and thus exhibit both these phenomena, so objects in the center of the image (if shot from a short distance) are particularly enlarged: even if the barrel distortion is corrected, the resulting image is still from a wide-angle lens, and will still have a wide-angle perspective.

See also

References

  1. Paul van Walree. "Distortion". Photographic optics. Archived from the original on 29 January 2009. Retrieved 2 February 2009.
  2. "Tamron 18-270mm f/3.5-6.3 Di II VC PZD". Retrieved 20 March 2013.
  3. 1 2 3 de Villiers, J. P.; Leuschner, F.W.; Geldenhuys, R. (17–19 November 2008). "Centi-pixel accurate real-time inverse distortion correction" (PDF). 2008 International Symposium on Optomechatronic Technologies. SPIE. doi:10.1117/12.804771.
  4. Brown, Duane C. (May 1966). "Decentering distortion of lenses" (PDF). Photogrammetric Engineering. 32 (3): 444–462. Archived from the original (PDF) on 12 March 2018.
  5. Conrady, A. E. (1919). "Decentred Lens-Systems". Monthly Notices of the Royal Astronomical Society. 79 (5): 384–390. Bibcode:1919MNRAS..79..384C. doi:10.1093/mnras/79.5.384.
  6. Zhang, Zhengyou (1998). A Flexible New Technique for Camera Calibration (PDF) (Technical report). Microsoft Research. MSR-TR-98-71.
  7. Fitzgibbon, A. W. (2001). "Simultaneous linear estimation of multiple view geometry and lens distortion". Proceedings of the 2001 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR). IEEE. doi:10.1109/CVPR.2001.990465.
  8. 1 2 3 Bukhari, F.; Dailey, M. N. (2013). "Automatic Radial Distortion Estimation from a Single Image" (PDF). Journal of mathematical imaging and vision. Springer. doi:10.1007/s10851-012-0342-2.
  9. Wang, J.; Shi, F.; Zhang, J.; Liu, Y. (2008). "A new calibration model of camera lens distortion". Pattern Recognition. Elsevier. doi:10.1016/j.patcog.2007.06.012.
  10. "PTlens". Retrieved 2 January 2012.
  11. "Lensfun". Retrieved 16 April 2022.
  12. "lensfun – Rev 246 – /trunk/README". Retrieved 13 October 2013.{{cite web}}: CS1 maint: deprecated archival service (link)
  13. "OpenCV". opencv.org/. Retrieved 22 January 2018.
  14. Wiley, Carlisle. "Articles: Digital Photography Review". Dpreview.com. Archived from the original on 7 July 2012. Retrieved 3 July 2013.
  15. "ImageMagick v6 Examples -- Lens Corrections".
  16. "Hugin tutorial – Simulating an architectural projection". Retrieved 9 September 2009.
  17. "FFmpeg Filters Documentation".

Leave a Reply