Lens Distortion

All commercial cameras deviate from the pin-hole camera model, and this deviation generally increases with the camera's field of view. Because every optical system consists of a number of lenses, distortion arises from imperfections in the manufacturing and assembly processes. Producing a distortion-free lens is extremely expensive; the problem is particularly evident in low-cost applications that rely on inexpensive optics.

These imperfections cause nonlinear distortion that is difficult to model. Moreover, because distortion depends on the interaction between the lens and the sensor, lens manufacturers generally do not provide, or cannot provide, geometric information on how to represent it.

The pin-hole camera model is valid only for undistorted images. Calibrating and then correcting geometric distortion is therefore a prerequisite for accurately reconstructing the three-dimensional structure of the observed scene.

From the perspective of the optical ray, lens distortion occurs between the world and the pin-hole. For modeling purposes, however, distortion is usually represented as a transformation applied to the ideal image coordinates generated by the pin-hole model. The pin-hole camera equation, modified to account for lens distortion, becomes

\begin{displaymath}
\mathbf{p} = \mathbf{K} f_d( [\mathbf{Rt}]\mathbf{x} )
\end{displaymath} (9.14)

In this formulation, the distortion $f_d$ maps a point from undistorted coordinates to distorted coordinates. This choice, rather than the inverse formulation, is made for purely practical reasons: because the goal is to obtain a dense, undistorted output image (see the discussion in Section 1.13), we need to compute the function that maps an undistorted point to a distorted point.

In general, lens distortion comprises radial components (directed along the line connecting the point to the distortion center) and tangential components (perpendicular to that line). Tangential components (and other components not discussed here) are usually small, while radial distortion is generally the dominant component. Its magnitude generally increases as the focal length decreases.

This section derives a general relationship between the ideal point $(x,y)$ and the observed, actual distorted image point $(\breve{x},\breve{y})$.

There is a single point $(x_d,y_d)$ in the image, called the distortion center, at which distortion has no effect. For this point, $(x,y)=(\breve{x},\breve{y})$.

Defining distortion requires using a new set of coordinates relative to the distortion center:

\begin{displaymath}
\begin{array}{l}
\bar{x} = x - x_d \\
\bar{y} = y - y_d \\
\end{array}\end{displaymath} (9.15)

The distortion center is usually close to $(0,0)$, but it is not guaranteed to coincide with the principal point. Several papers propose, as an approximation, ignoring the distortion center and assuming it coincides with the principal point, or considering only the decentering distortion term.

The classical Brown-Conrady formulation (Bro66) models lens distortion as a displacement:

\begin{displaymath}
\begin{array}{l}
\breve{x} = x + \delta_x (\bar{x},\bar{y}) \\
\breve{y} = y + \delta_y (\bar{x},\bar{y})
\end{array}\end{displaymath} (9.16)

These displacements can be divided into the following components:

radial distortion

The displacement due to radial distortion is given by

\begin{displaymath}
\begin{array}{l}
\delta^{r}_x = \bar{x}\left(f_r(r)-1\right) \\
\delta^{r}_y = \bar{y}\left(f_r(r)-1\right)
\end{array}\end{displaymath} (9.17)

where $f_r(r)$ is a function of the radius $r=\sqrt{\bar{x}^2+\bar{y}^2}$ alone, the Euclidean distance between the point and the distortion center, subject to the constraint $f_r(0)=1$.

The analytical form of the function $f_r(r)$ is generally unknown and is approximated by a series expansion:

\begin{displaymath}
f_r(r) = 1 + k_{1} r^{2} + k_{2} r^{4} + k_{3} r^{6} + \ldots
\end{displaymath} (9.18)

Only powers that are multiples of 2 appear because of the symmetry of the function $f_r$.

thin prism distortion
Manufacturing imperfections and misalignment between the sensor and the lens introduce additional asymmetric distortions. These are usually modeled as
\begin{displaymath}
\begin{array}{l}
\delta^{(p)}_x = s_1 r^2 + s_3 r^{4} + \ldo...
...
\delta^{(p)}_y = s_2 r^2 + s_4 r^{4} + \ldots \\
\end{array}\end{displaymath} (9.19)

However, these terms are often insufficient to describe the effects of optical decentering.

decentering distortion
This is usually caused by incorrect assembly of the lens and the various components that make up the optical system. The Brown-Conrady model represents the decentering component as
\begin{displaymath}
\begin{array}{l}
\delta^{(t)}_x = (p_1 (r^2 + 2 \bar{x}^2) +...
...2) + 2 p_1 \bar{x} \bar{y} ) (1 + p_3 r^2 + \ldots)
\end{array}\end{displaymath} (9.20)

This component comprises both radial and tangential parts.

Combining all these components in Equation (9.16) gives the complete Brown-Conrady model:

\begin{displaymath}
\begin{array}{l}
\bar{x} = x - x_d \\
\bar{y} = y - y_d \...
...) (1 + p_3 r^{2} + \ldots) + s_2 r^{2} + \ldots \\
\end{array}\end{displaymath} (9.21)

Radial distortion is dominant, and in many applications the first few terms are more than sufficient.

For example, OpenCV's standard distortion model normally uses three radial coefficients ($k_1,k_2,k_3$) and two decentering coefficients ($p_1,p_2$).

Distortion coefficients are estimated using various techniques from the literature, applied to images acquired in a controlled environment (calibration grids). A nonlinear minimizer is usually used. One approach works with straight lines and iterates until all curves in the image become straight lines—the plumb-line method (DF01). Another constrains points on a plane with known coordinates to define a homography. These techniques can be applied only when working in image coordinates (Approach 1).

To calibrate distortion in normalized camera coordinates (Approach 2), distortion and camera intrinsic parameters must be estimated simultaneously (Zha99). An initial estimate of the intrinsic parameters can be obtained using a linear minimizer, but the final estimate requires a nonlinear minimizer.

The widely used technique for estimating distortion parameters is to optimize the observations of image feature points whose world coordinates are known, thereby enforcing a complete perspective projection (Section 9.5.6).

Paolo medici
2026-10-19