All commercial cameras deviate from the pin-hole camera model, and this deviation is generally greater as the camera's field of view increases: since every optical system consists of a number of lenses, distortion arises from nonidealities during the manufacturing and assembly of the optical system. Producing a distortion-free lens is in fact an extremely costly process, and the problem is particularly evident in low-cost applications, which must rely on inexpensive optics.
These nonidealities produce nonlinear distortion that is difficult to model and, also because this distortion depends on the interaction between the lens and the sensor, lens manufacturers normally do not provide, or are unable to provide, geometric information describing how to represent it.
It is important to note that the pin-hole camera model is valid only when the image being processed is undistorted; therefore, calibration, that is, correction of geometric distortion, is a prerequisite for accurately reconstructing the three-dimensional structure of the observed scene.
From the optical-ray perspective, the distortion introduced by the lens lies between the world and the pin-hole.
The pin-hole camera equation modified to include optical distortion becomes
| (9.14) |
With this formalism, distortion transforms a point from undistorted coordinates to distorted coordinates.
This choice, as opposed to the inverse formulation, follows from purely practical considerations:
since the objective is to obtain a dense, undistorted output image (see the discussion in Section 1.13), it is necessary to compute the function that transforms an undistorted point into a distorted point.
In general, the lens-distortion contributions are divided into radial components (directed along the line connecting the point to the distortion center) and tangential components (perpendicular to that line). Tangential contributions (as well as other contributions not discussed here) are normally small, whereas radial distortion is always detectable and generally increases in magnitude as the focal length decreases.
This section derives a general relationship between the ideal point and the actual observed distorted image point
.
There is a single point in the entire image, called the distortion center, at which distortion has no effect.
For this point
.
To define distortion, it is necessary to work in a new coordinate system centered at the distortion center:
| (9.15) |
The classical Brown-Conrady formulation (Bro66) models lens distortion as an offset:
These offsets can be divided into contributions:
The function of radial distortion is not known explicitly but can be approximated using the first terms of its series expansion:
| (9.19) |
These contributions are often insufficient, however, to describe the effects of optical decentering.
| (9.20) |
Substituting all these contributions into Equation (9.16), the complete Brown-Conrady model is written as
For example, OpenCV models distortion using the R3P1 model: three radial terms (,
,
) and the first-order decentering terms (
,
).
Distortion coefficients are obtained using various techniques available in the literature, applied to images acquired in a structured environment (calibration grids). A nonlinear optimizer is normally used, either by working with lines and iterating until all image curves become straight lines, the plumb-line method (DF01), or by constraining points on a plane with known coordinates to form a homography. These techniques can be applied only when working in image coordinates (approach 1).
To calibrate distortion in normalized camera coordinates (approach 2), the distortion and the camera's intrinsic parameters must be computed simultaneously (Zha99). An initial estimate of the intrinsic parameters can be obtained using a linear optimizer, but the final estimate can be obtained only through a nonlinear optimizer.
The widely used technique for estimating distortion parameters is to optimize the observation of feature points in the image whose positions in world coordinates are known, thereby enforcing a complete perspective projection (Section 9.5.6).
Paolo medici