# Distortion

Assuming the camera model is pinhole, according to Brown's distortion model, there are two types of common distortions: **radial** distortion and **tangential** distortion.

### Radial distortion

* The most commonly encountered distortions are radially symmetric, due to the symmetry of a photographic lens. These radial distortions can be classified as either barrel distortions or pincushion distortions.&#x20;
  * Barrel distortion: image magnification decreases with distance from the optical axis.
  * Pincushion distortion: image magnification increases with distance from the optical axis.

![](https://3310611219-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LwRt8_BWYScDaMKj3wZ%2Fuploads%2FAzmpAh26IrMrsT6VFJgZ%2Fbarrel_pincushion_distorsion.PNG?alt=media\&token=e38f1639-22bd-4498-9281-f9a22c07517b)

* Mathematically, barrel and pincushion distortion are **quadratic**, meaning they increase as the square of distance from the center. We can model it with three parameters: $$k\_1, k\_2, k\_3$$.

$$
x\_{\text {distorted }}=x\left(1+k\_{1} r^{2}+k\_{2} r^{4}+k\_{3} r^{6}\right)
\ y\_{\text {distorted }}=y\left(1+k\_{1} r^{2}+k\_{2} r^{4}+k\_{3} r^{6}\right)
$$

### Tangential distortion

* Tangential distortion can happen when the lens is not fully parallel to the image plane.

![](https://3310611219-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LwRt8_BWYScDaMKj3wZ%2Fuploads%2FV3ueq2STMp1XmXdXvnnz%2Ftangential_distortion.png?alt=media\&token=84017079-a314-4803-ba7d-e06f6fb2370b)

* Mathematically, we can model this distortion with two parameters: $$p\_1, p\_2$$.

$$
x\_{\text {distorted }}=x+2 p\_{1} x y+p\_{2}\left(r^{2}+2 x^{2}\right) \ y\_{\text {distorted }}=y+p\_{1}\left(r^{2}+2 y^{2}\right)+2 p\_{2} x y
$$

#### References

* <https://en.wikipedia.org/wiki/Distortion_(optics)>
* 14 Lectures in Visual SLAM
