In the context of camera calibration, the parameters ( k1, k2, p1, p2, ) and ( k3 ) are used to correct lens distortion, typically radial and tangential distortions. Here’s what each term represents:
Radial Distortion Coefficients
-
k 1 k1 k1: The first radial distortion coefficient. It corrects for the most significant radial distortion, which causes straight lines to appear curved, especially near the edges of the image.
-
k 2 k2 k2: The second radial distortion coefficient. It refines the correction provided by k 1 k1 k1 and accounts for more complex radial distortions.
-
k 3 k3 k3: The third radial distortion coefficient. It further refines the distortion correction, important for lenses with extreme distortions.
Tangential Distortion Coefficients
-
p 1 p1 p1: The first tangential distortion coefficient. This corrects for tangential distortion, which occurs when the lens and the image plane are not parallel. It shifts the image in a direction tangent to the radially distorted points.
-
p 2 p2 p2: The second tangential distortion coefficient. It complements p 1 p1 p1 by providing an additional degree of correction for tangential distortion.
Mathematical Representation
The distorted coordinates ( x d , y d ) (x_d, y_d) (xd,yd) are corrected to undistorted coordinates ( x u , y u ) (x_u, y_u) (xu,yu) using these coefficients. The equations to correct the distorted coordinates are typically:
x u = x d ( 1 + k 1 ⋅ r 2 + k 2 ⋅ r 4 + k 3 ⋅ r 6 ) + 2 ⋅ p 1 ⋅ x d ⋅ y d + p 2 ⋅ ( r 2 + 2 ⋅ x d 2 ) x_u = x_d (1 + k1 \cdot r^2 + k2 \cdot r^4 + k3 \cdot r^6) + 2 \cdot p1 \cdot x_d \cdot y_d + p2 \cdot (r^2 + 2 \cdot x_d^2) xu=xd(1+k1⋅r2+k2⋅r4+k3⋅r6)+2⋅p1⋅xd⋅yd+p2⋅(r2+2⋅xd2)
y u = y d ( 1 + k 1 ⋅ r 2 + k 2 ⋅ r 4 + k 3 ⋅ r 6 ) + p 1 ⋅ ( r 2 + 2 ⋅ y d 2 ) + 2 ⋅ p 2 ⋅ x d ⋅ y d y_u = y_d (1 + k1 \cdot r^2 + k2 \cdot r^4 + k3 \cdot r^6) + p1 \cdot (r^2 + 2 \cdot y_d^2) + 2 \cdot p2 \cdot x_d \cdot y_d yu=yd(1+k1⋅r2+k2⋅r4+k3⋅r6)+p1⋅(r2+2⋅yd2)+2⋅p2⋅xd⋅yd
where r 2 = x d 2 + y d 2 r^2 = x_d^2 + y_d^2 r2=xd2+yd2.
The possible value ranges for the camera calibration parameters (k1), (k2), (k3), (p1), and (p2) depend on the specific characteristics and quality of the lens as well as the calibration process. However, typical ranges based on common distortion models and practical experiences are as follows:
Radial Distortion Coefficients
-
k 1 k1 k1: Usually in the range of − 1 ≤ k 1 ≤ 1 -1 \leq k1 \leq 1 −1≤k1≤1, but for most practical lenses, it tends to be much smaller, e.g., − 0.5 ≤ k 1 ≤ 0.5 -0.5 \leq k1 \leq 0.5 −0.5≤k1≤0.5.
-
k 2 k2 k2: Typically smaller than k 1 k1 k1, often in the range of − 0.5 ≤ k 2 ≤ 0.5 -0.5 \leq k2 \leq 0.5 −0.5≤k2≤0.5.
-
k 3 k3 k3: Often even smaller, usually in the range of − 0.1 ≤ k 3 ≤ 0.1 -0.1 \leq k3 \leq 0.1 −0.1≤k3≤0.1.
Tangential Distortion Coefficients
-
p 1 p1 p1: Generally small, typically in the range of − 0.1 ≤ p 1 ≤ 0.1 -0.1 \leq p1 \leq 0.1 −0.1≤p1≤0.1.
-
p 2 p2 p2: Similar to p 1 p1 p1, usually in the range of − 0.1 ≤ p 2 ≤ 0.1 -0.1 \leq p2 \leq 0.1 −0.1≤p2≤0.1.
Practical Considerations
- Radial Distortion \text{Radial Distortion} Radial Distortion: The radial distortion coefficients (k1, k2, k3) control the “pincushion” or “barrel” distortion, which can be quite pronounced in wide-angle lenses.
- Tangential Distortion \text{Tangential Distortion} Tangential Distortion: The tangential distortion coefficients (p1, p2) are typically smaller because they correct for misalignments which are less common and less severe than radial distortions.
Calibration Process
It’s important to note that these ranges are indicative based on general use cases. During the camera calibration process, these coefficients are derived from optimization algorithms that minimize the difference between the observed image points and the projected points from the 3D world coordinates. Thus, the exact values can vary based on the specific lens and camera system being calibrated.
If the computed values during calibration fall far outside these typical ranges, it might indicate an issue with the calibration procedure, such as poor quality of the input images, insufficient number of calibration points, or incorrect assumptions in the camera model.