# 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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wiki.hanzheteng.com/algorithm/cv/distortion.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
