Abstract
Lens distortion is closely related to the spatial position of depth of field (DoF), especially in close-range photography. The accurate characterization and precise calibration of DoF-dependent distortion are very important to improve the accuracy of close-range vision measurements. In this paper, to meet the need of short-distance and small-focal-length photography, a DoF-dependent and equal-partition based lens distortion modeling and calibration method is proposed. Firstly, considering the direction along the optical axis, a DoF-dependent yet focusing-state-independent distortion model is proposed. By this method, manual adjustment of the focus and zoom rings is avoided, thus eliminating human errors. Secondly, considering the direction perpendicular to the optical axis, to solve the problem of insufficient distortion representations caused by using only one set of coefficients, a 2D-to-3D equal-increment partitioning method for lens distortion is proposed. Accurate characterization of DoF-dependent distortion is thus realized by fusing the distortion partitioning method and the DoF distortion model. Lastly, a calibration control field is designed. After extracting line segments within a partition, the de-coupling calibration of distortion parameters and other camera model parameters is realized. Experiment results shows that the maximum/average projection and angular reconstruction errors of equal-increment partition based DoF distortion model are 0.11 pixels/0.05 pixels and 0.013°/0.011°, respectively. This demonstrates the validity of the lens distortion model and calibration method proposed in this paper.
Keywords: lens distortion, DoF-dependent, distortion partition, vision measurement
1. Introduction
Vision measurement is a subject that allows quantitative perception of scene information by combining image processing with calibrated camera parameters. Therefore, the calibration accuracy of the parameters is an important determinant of the vision measurement uncertainty. The lens distortion is closely related to the depth of field (DoF), which refers to the distance between the nearest and the farthest objects that are in acceptably sharp focus in an image. For medium- or high-accuracy applications, close-range imaging parameters (e.g., short object distance (<1 m) and small focal length) are often adopted. In such occasions, DoF has a significant influence on lens distortion and, hence, becomes a major cause of vision measurement errors. For instance, to ensure that the vision has a micron-level accuracy when detecting the contouring error of a machine tool [1], the camera is placed 400 mm away from the focal plane to collect and analyze the image sequence of the interpolation trajectory running in the DoF. In this case, measurement errors ranging from dozens to hundreds of microns can be caused by a large lens distortion. Therefore, to improve the vision measurement accuracy in close-range photogrammetry, accurate modeling and calibration of the DoF-dependent lens distortion are urgently needed.
The lens distortion model maps the relation between distorted and undistorted image points. Models to show the relations vary according to the types of optical systems, which include the polynomial distortion model, logarithmic fish-eye distortion model [2], polynomial fish-eye distortion model [2,3,4,5], field-of-view (FoV) distortion model [6], division distortion model [7,8], rational function distortion model [9,10], and so on. In 1971, Brown [11,12] proposed the Gaussian polynomial function to express radial and decentering distortion, which is particularly suitable for studying the distortion of a standard lens in high-accuracy measurements [13,14]. Later, researchers noticed that the observed radial and decentering distortion varies with the focal length, the lens focusing state (i.e., focused or defocused), and the DoF position. Since then, researchers have focused on the improvement of distortion calibration and modeling methods to obtain a precise representation of distortion behavior. For the distortion calibration, the study goes in two directions: the coupled-calibration method and the decoupled-calibration method. The former can be generally divided into three types: self-calibration method [15], active calibration method, and traditional calibration method [16]. Among the traditional ones, Zhang’s calibration method [17] and its improved method [18,19,20], used widely in industry and scientific research, are the most popular. In this coupled-calibration method, the distortion parameters are calculated by performing a full-scale optimization for all parameters. Due to the strong coupling effect, the estimated errors of other parameters (i.e., intrinsic and extrinsic parameters) in the camera model would be propagated to that of distortion parameters, thus leading to the failure of getting optimal solutions. By contrast, the decoupled-calibration method does not involve coupling other factors or entail any prior geometric knowledge of the calibration object, and only geometric invariants of some image features, such as straight lines [6,12,21,22,23], vanishing points [24], or spheres [25], are needed to solve the parameters. Among these features, straight lines can be easily reflected in scenes and extracted from noise images, thus having enormous potential.
Regarding the distortion modeling, some researchers incorporated the DoF into the distortion function. Magill [26] used the distortion of two focal planes at infinity to solve that of an arbitrary focal plane. Then, Brown [12] improved Magill’s model by establishing distortion models of any focal plane and any defocused plane (the plane perpendicular to the optical axis in the DoF) on the condition that the distortions of two focal planes are known. Soon after, Fryer [27], based on Brown’s model, realized the lens distortion calibration of an underwater camera [28]. Fraser and Shortis [29] introduced an empirical model and solved the Brown model’s problem of inaccurate description of large image distortion. Additionally, Dold [30] established a DoF distortion model that is different from Brown’s and solved the model parameters through the strategy of bundle adjustment. In 2004, Brakhage [31] characterized the DoF distortion of the telecentric lens in a fringe projection system by using Zernike Polynomials. Moreover, in 2006, the DoF distortion distribution of the grating projection system was experimentally analyzed by Bräuer-Burchardt. In 2008, Hanning [32] introduced depth (object distance) into the spline function to form a distortion model and used the model to calibrate radial distortion.
The above DoF distortion models not only depend on the focusing state but also relate to the distortion coefficients on the focal plane. For these models, on the one hand, the focusing state is usually adjusted by manually twisting the zoom and focus rings, which introduces human errors and changes the camera parameters. On the other hand, the focus distance and distortion parameters on the focal plane cannot be determined accurately. To overcome the problem, Alvarez [33], based on Brown’s and Fraser’s models, deduced a radial distortion model that is suitable for planar scenarios. With this model, when the focal length is locked, distortion at any image position can be estimated by using two lines in a single photograph. In 2017, Dong [34] proposed a DoF distortion model, by which the researcher accurately calibrated the distortion parameters on arbitrary object planes, and reduced the error from 0.055 mm to 0.028 mm in the measuring volume of 7.0 m × 3.5 m × 2.5 m with the large-object-distance of 6 m. Additionally, in 2019, Ricolfe-Viala [35] proposed a depth-dependent high distortion lens calibration method, by embedding the object distance in the division distortion model, and the highly distorted images can be corrected with only one distortion parameter. However, these researchers only used one set of coefficients, which is not sufficient to accurately represent the distortion. To address this problem, some scholars adopted the idea of partitioning to process image distortion, which uses several sets of distortion coefficients to characterize the distortion. The study, however, which is only applicable to the partitioning of a 2D object plane, fails to take into account the distortion partition within the DoF and the correlation between lens distortion and DoF. Our previous work partitioned the distortion with an equal radius [36]. Although it improved the vision measurement accuracy, the distortion correction accuracy within the partition corresponding to the image edge is still low. Besides, the distortion model we adopted depends on the focusing state of the lens, thus is less practical. In general, the current distortion model and partitioning method cannot accurately reflect the lens DoF distortion behavior in close-range photography, especially for short-distance measurements.
To solve the above problems, the lens distortion model and calibration method for short-distance measurement, which takes into consideration the dimensions of DoF and equal-increment partition of distortion, are proposed in this paper. The rest of this paper is organized as follows. In Section 2, a focusing-state-independent DoF distortion model, which only involves the spatial position of the observed point, is constructed. In Section 3, based on the model in previous section, an equal-increment partitioning DoF distortion model is proposed, which enables a fine representation of the lens distortion in the photographic field. Section 4 details the calibration method for both DoF distortion and camera model parameters, as well as the image processing of the control field for distortion calibration. In Section 5, experimental verification of the proposed lens distortion model and calibration method is carried out. Finally, Section 6 concludes this paper.
2. Focusing-State-Independent DoF Distortion Model
The observed distortion of a point varies with its position within the DoF. Though the close-range imaging configuration increases the visible range, it enlarges the DoF image distortion, consequently affecting the measurement accuracy. To break the limitations of the aforementioned in-plane and DoF distortion model in the vision measurement of short-distance and small-focal-length settings, a DoF-dependent yet focusing-state-independent distortion model is proposed in this paper.
2.1. Pinhole Camera Model with Distortion
As illustrated in Figure 1, the linear pinhole camera model depicts the one-to-one mapping between the 3D points in the object space and its 2D projections in the image. Let be undistorted coordinates mapped from a spatial point in the world coordinate system to the image coordinate system through the optical center . Then, camera mapping can be expressed as [17]
| (1) |
where describes the scaling factor; is the intrinsic parameter matrix, which quantitatively characterizes the critical parameters of the image sensor (i.e., Charge Coupled Device (CCD) or Complementary Metal-Oxide Semiconductor (CMOS)); Matrix , expressing the transformation between the vision coordinate system (VCS) and the world coordinate system, consists of the rotation matrix and translation matrix .
Figure 1.
Schematic diagram of camera model and lens distortion: (a) camera model; (b) barrel distortion; (c) pincushion distortion.
However, manufacturing and assembly errors can lead to radial and decentering lens distortion. Consequently, the pinhole assumption does not hold for real camera systems, and the image projection of a straight line would be bent into a curve (Figure 1b,c). To characterize the lens distortion, Brown proposed the distortion model in a polynomial form [11,12]:
| (2) |
where is the distorted coordinates; and are the distortion functions of an image point in the and direction respectively; denotes the distortion center; stands for the distortion radius of the image point; and are the first and second-order coefficients of radial distortion respectively; while, and are the first and second-order coefficients of decentering distortion respectively.
2.2. Distortion Model in the Focal Plane
2.2.1. Radial Distortion Model
Let be the radial distortion for a lens that is focused on plus infinity, while on the minus infinity. refers to the vertical magnification in the focal plane at object distance . According to Magill’s model [26], , the lens radial distortion in the focal plane, can be expressed as
| (3) |
Let and be the radial distortions in the focal planes when the lens is focused on the distances of and respectively. Then, the distortion function for focal plane at distance can be written as
| (4) |
where, is the focal length; . The -th radial distortion coefficients for focused object plane at distance are
| (5) |
where and are the -th radial distortion coefficients when the lens is focused on the distances of and respectively. As can be easily noticed in Equation (5), if the radial distortion coefficients of two different focal planes are known, the radial distortion coefficients of any focal plane can be obtained.
2.2.2. Decentering Distortion
As for the decentering distortion, the equations are as follows [12]:
| (6) |
where is the compensation coefficient; and represent the components of the decentering distortion in the and the direction respectively; and depict the object distances corresponding to the two focal planes, respectively.
2.3. DoF-Dependent Distortion Model for Arbitrary Defocused Plane
2.3.1. DoF-Dependent Radial Distortion Model
Fraser and Shortis [29] proposed an empirical model for describing the distortion of any object plane (or defocused plane), which solved Brown model’s problem of inaccurate description of severe distortion caused by the image configuration of short-distance and small-focal-length settings. The equation is as follows:
| (7) |
where denotes the radial distortion coefficient in the defocused plane with the depth of when the lens is focused at distance ; is the empirical coefficient; and represent the radial distortion coefficients in the focal planes at distances and respectively. By extending the equation, we can get the radial distortion function at expressed by the at when the lens is focused at the distance of :
| (8) |
From the above equation, we can easily obtain . Then, by extending the results to the radial distortion of a point in the defocused plane at distance , the relationship between , and can be given by
| (9) |
in which , , and .
After eliminating the focus distance and the distortion in the focal plane, we can obtain the following equation:
| (10) |
Then, we can have . can be expressed as
| (11) |
Obviously, when the lens is focused at distance , through two distortions corresponding to object distances and respectively, radial distortion coefficient in any defocused plane with the depth of when the lens is focused at distance can be obtained:
| (12) |
When two object planes are set, , , , and are known. Thus, in Equation (12) is only dependent on , and it is independent of the distortion coefficient on the focal plane and the focus distance .
2.3.2. DoF-Dependent Decentering Distortion Model
In Equation (6), since , the distortion in the focal plane can be written as
| (13) |
where , and are the decentering distortion functions in the defocused plane at the object distances of , and when the lens is focused at distance respectively. From the first two lines of the above equation, we get , and then
| (14) |
Put the first line into the second one, and we obtain
| (15) |
Equation (15) can be simplified to
| (16) |
Put () into Equation (16), and the following equation is obtained:
| (17) |
Given the parameters , , and are known, it can be illustrated from Equation (17) that the decentering distortion coefficient in any defocused plane is dependent only on the object distance, , and is independent of the focus distance and the distortion in the focal plane. Moreover, since focal length is not included in Equation (17), decentering distortion is not affected by this parameter.
Hereto, the DoF-dependent yet focusing-state-independent distortion model suitable for close-range, short-distance measurement scenes is established, which overcomes the limited practicability caused by the way of calibrating DoF distortion by manual adjustment of the focus and zoom rings, and it also solves the problem when the current position and the distortion parameters of the focal plane are not exactly known.
3. Equal-Increment Partition Based DoF Distortion Model
The distortion coefficients are solved by minimizing the straightness error of the observed points. If a set of distortion coefficients is used to describe the distortion in the whole image, the distortion coefficients will be the error balance of all points. However, for each region of the image the error is not the minimum. Hence, an equal-increment partition based DoF distortion model is proposed in this section. The distortion spreads outward from the image center along a circumferential contour, with the characteristics of the image being small in the middle and large on the image edge. In this paper, we first partition the in-plane distortion in an equal-increment way, then the 2D partition strategy is extended to the 3D photographic field.
3.1. Equal-Increment Based Distortion Partitioning Method
Figure 2 presents two distortion partitioning methods. The axis represents the distance from an image point to the distortion center , namely the distortion radius. The axis describes the distortion in pixels. The blue curve is the distortion curve calculated by the features in the whole image. As illustrated in Figure 2a, when DoF distortion is partitioned by an equal radius, the distortion increment of each partition is different () despite the same distortion radius increment () [36]. For a polynomial-based distortion function, it is well known that the more scattered the distorted points and the larger the distortion increments are, the lower the regression accuracy of the function to the distortion is. As a result, the estimated accuracy of the partition’s distortion parameters decreases gradually from inside to outside ().
Figure 2.
Two distortion partitioning methods: (a) equal-radius partition; (b) equal-increment partition.
To solve the problem, a DoF distortion model based on the equal-increment partition is proposed in this paper, and the procedures are as follows:
-
(1)
Estimate the distortion curve using all features in the whole image (Figure 2b). Then, determine the maximum value of image distortion according to the maximum distortion radius and distortion curves. The maximum distortion radius of the image is , where and are the length and height of the image, respectively.
-
(2)
In the central image region, the distortion is so tiny that it cannot converge after iteration, which results in a poorer quality of the undistorted image than that of the original one. Therefore, we use , the minimum distortion value when the algorithm converges in the central image region, as the threshold to estimate , the minimum value of the image distortion radius.
-
(3)
Determine the number of partitions .
-
(4)
Use the maximum distortion , the lower-limit distortion , and to determine the distortion increment of each partition , (Figure 2b).
-
(5)
Calculate the radius increment of each partition using and the distortion curve, (Figure 2b).
-
(6)
Calibrate the distortion curve of each partition by the features in the corresponding partition of the image utilizing the decoupled-calibration method (see Section 4).
Then the distortion partition of the 2D object plane is extended to the 3D DoF. As can be known from Equation (1), the object-to-image mapping satisfies the following:
| (18) |
where and are two points in the VCS. The 2D point (in millimeters) is the image projection of the and (, , and are collinear). Let be the partition radius, then , and we get
| (19) |
From the above equation, we can know that and , where and are the depths of the -th () and the -th () object planes in the VCS respectively. and are the partition radius of the two object planes. Let and , and then extend the above distortion partitions to 3D DoF domain. As shown in Figure 3, if the range of the -th partition in the object plane is , the partition range in object planes and are and respectively. In this way, although the distortion radius in each partition is different, distortion coefficients can be obtained with high accuracy when the image distortion is partitioned by equal distortion increments.
Figure 3.
The geometric relationship between the partition radii in different object planes.
3.2. Equal-Increment Partition Based DoF Distortion Model
After partitioning the DoF distortion, we incorporate the partitions into the DoF distortion model. Procedures to solve the partition radius and distortion coefficients on any object distance are as follows:
-
(1)
Partition the distortion in the object plane using the proposed method, and calculate the -th order radial and decentering distortion coefficients in the -th partition. Register the two coefficients as and respectively.
-
(2)
Based on the -th partition in the object plane (the object distance is ), the corresponding partition radius in the object plane (the object distance is ) is calculated. In addition, the -th order radial and decentering distortion coefficients can be computed. Register the two coefficients as and respectively.
-
(3)Based on the partitions in the object plane , we calculate the partitions in the object distance plane (the object distance is ). Then, for the -th partition of the object plane , the radial distortion coefficient and the decentering distortion coefficient can be expressed as
(20) From the equation, we can know(21) At this point, we have established an equal-increment partition based DoF distortion model for any object plane at when the lens is focused at distance .
4. Calibration Method for Camera Parameters
In close-range photography, the DoF images are seriously distorted, so the calibration accuracy of the distortion parameters is the decisive factor affecting the vision measurement accuracy. When the coupled-calibration method is used to solve the distortion parameters, the estimated errors of intrinsic and extrinsic parameters will be propagated to distortion parameters. Thus, a two-step method is proposed to calibrate the camera parameters, in which distortion parameters are estimated independently.
4.1. Independent Distortion Calibration Method Based on Linear Conformation
Figure 4 details the experimental system for DoF lens distortion, which consists of a monocular camera, a control field, a light source, an electric control platform, and a multi-axis motion controller. The X, Y, A, and C axes of the platform are in the object space, while the Z-axis is in the image space. A control field, with the features of circle, corner, and line, is used to calibrate the lens distortion, and the geometric relationship between the features is known accurately. On this basis, the pose of the control field relative to the image plane can be adjusted by the Perspective-n-Point (PnP) algorithm.
Figure 4.
Experimental system for calibrating depth of field (DoF) lens distortion.
In this paper, the distortion coefficients can be estimated by the plumb-line method [12] alone. It is defined by Brown (1971) as “a straight line in the object space will be mapped to the image plane in a straight way after a perfect lens, and any change of straightness can be reflected as the lens distortion described by the radial and decentering distortion coefficients.”
As demonstrated in Figure 5, when edge points on the same curve are known, the regression line equation determined by the point group is
Figure 5.
Schematic diagram of distortion calibration based on linear conformation configuration.
| (22) |
Let , , , . where is the angle between the regression line and the axis (Figure 5). , , , , .
Given there are lines and there are points in the -th line, the average sum of squared distances from the points to all the lines can be written as
| (23) |
Any distortion of a line’s straightness in the image plane can be corrected by a mapping involving radial and decentering distortion. Thus, substitute Equation (2) into Equation (23) and we can get
| (24) |
If there are lines in an image and observation points are extracted from each line, we can have equations. In these equations, there are variables ( line coefficients and 4 distortion coefficients). If , the optimal solution of distortion coefficients can be obtained.
After solving the image distortion coefficients, the inverse mapping between the undistorted image and distorted image is established by cubic B-spline interpolation. In this way, the image distortion can be corrected. Besides, in this paper, the three straightness indicators of the maximum, average, and root mean square (RMS) of the point-to-line distance, and the Peak Signal-to-Noise Ratio (PSNR) , are used to evaluate the distortion correction effects. has been defined in Equation (23), and is the mean square error of the image before and after distortion correction.
4.2. Image Processing and Camera Calibration
In this paper, the parameters in the equal-increment partition based DoF distortion model are calculated by using straight lines in a particular area of the control field. To this end, the corner control based method, for extracting line segments within a partition, is proposed. As shown in Figure 6, the image processing procedures include the following:
-
(1)
Image acquisition. Capture the image of the control field using the monocular camera (Figure 6a).
-
(2)
Point detection. Corners of the checkerboard are extracted by the Harris detector (Figure 6b), and the edge points on the curve are detected by the Canny operator with subpixel accuracy.
-
(3)
Point connection. Use the edge points between two adjacent corners to form unit segments (Figure 5). In each segment, David Lowe’s method [37] is used to track and connect the edge points in the four-link area from one particular point to the others (Figure 6c). The minimum connection length is set to be greater than 10 pixels.
-
(4)
Point reselection. The distortion is not evenly distributed on the image, with the largest at the image edge, which makes it difficult to remove the noisy point. To solve this problem, the tolerance band of 4 pixels (Figure 5) set in each unit segment is used as the constraint to filter out the outliers. Consequently, the new edge points are determined (Figure 6d).
-
(5)
Line extraction. Any line can be obtained according to the corner position and the predefined distortion radius. Figure 6e,f shows the extraction results of the 19th horizontal line and the lines in different areas of the control field, respectively.
Figure 6.
Image processing procedures for linear conformation: (a) image of the control field; (b) corner detection; (c) edge point connection; (d) point reselection; (e) horizontal line extraction; (f) line detection results in different areas.
By combining the image processing results with the DoF distortion partition model, distortion parameters at any position of the DoF can be determined. To avoid the coupling effect between the distortion parameters and other parameters in the camera model, the camera’s intrinsic and extrinsic parameters are preliminarily calibrated by Zhang’s method. Then, we fix the distortion parameters and place the high-precision target in multiple spatial positions to optimize the intrinsic and extrinsic parameters. The cost function to be optimized is
| (25) |
where describes the cost function when the control field is in the -th pose. and are the rotation and translation matrices in the -th pose. and are the -th order radial and -th order decentering distortion coefficients in the -th partition of the -th pose. By using the Levenberg–Marquardt (LM) algorithm, the optimal solution of the camera’s intrinsic and extrinsic parameters can be obtained.
Through the above process, the monocular camera calibration can be realized. In practice, the partition where a spatial point is located can be determined after estimating its 3D position . Then, the observed distortion can be corrected by choosing the proper distortion coefficients, thus realizing high-accuracy vision measurements.
5. Accuracy Verification Experiments of Both the Distortion Modeling and Calibration Method
5.1. Experimental Verification of the 2D Distortion Partitioning Method
The experimental system is shown in Figure 7. The stroke of the electric control platform along the optical axis of the camera is 500 mm, and the size of the control field is 300 × 300 mm. The SIGMA zoom lens (18–35 mm) and HIK ROBOT camera (MV-CH120-10TM) are selected for imaging. The resolution and focal length are set as 2560 × 2560 pixels and 18 mm respectively. The procedures are as follows:
-
(1)
calibrate the intrinsic and extrinsic parameters of the monocular camera;
-
(2)
make adjustments to ensure that the circle features are distributed symmetrically around the image center;
-
(3)
the pose of the control field is determined and adjusted repeatedly to ensure the object and the image planes are parallel;
-
(4)
the control field is driven by the electronic control platform to move several object planes along the optical axis. The image of the control field in each plane is collected and analyzed by the algorithm on the graphic workstation.
Figure 7.
Experimental system for DoF distortion calibration: (a) system hardware; (b) control field.
First, the accuracy of the 2D distortion partitioning method is verified. The image of the control field at the focus distance is divided into five concentric rings by the equal-radius (Figure 8a–e) and equal-increment (Figure 9a–e) distortion partition models, respectively. In each partition, the corresponding lines (green ones) are selected to solve the distortion coefficients and correct the image distortion. For each of the two partitioning methods, five corrected images can be obtained (i.e., Figure 8f–j and Figure 9f–j). Here, we use Figure 8f and Figure 9f as an example to illustrate the results of distortion correction. The distortion on the image edge solved by the distortion coefficients of the first partition is far beyond the actual distortion here. After distortion correction, distortion is removed overly, thus resulting in the distortion in the opposite direction.
Figure 8.
Distortion calibration and correction results based on the equal-radius partition method (f = 18 mm): (a) partition 1; (b) partition 2; (c) partition 3; (d) partition 4; (e) partition 5; (f) distortion correction (partition 1); (g) distortion correction (partition 2); (h) distortion correction (partition 3); (i) distortion correction (partition 4); (j) distortion correction (partition 5); (k) difference (partition 1); (l) difference (partition 2); (m) difference (partition 3); (n) difference (partition 4); (o) difference (partition 5).
Figure 9.
Distortion calibration and correction results based on the proposed partition method (f = 18 mm): (a) partition 1; (b) partition 2; (c) partition 3; (d) partition 4; (e) partition 5; (f) distortion correction (partition 1); (g) distortion correction (partition 2); (h) distortion correction (partition 3); (i) distortion correction (partition 4); (j) distortion correction (partition 5); (k) difference (partition 1); (l) difference (partition 2); (m) difference (partition 3); (n) difference (partition 4); (o) difference (partition 5).
To compare the distortion correction effect of each partition in the image, we subtract the simulated undistorted image with the corrected image, and we get Figure 8k–o and Figure 9k–o. Obviously, the smaller the gray value is, the closer the undistorted image is to the ground truth, and the better the distortion removal effect is. As can be seen from the figures, the distortion correction results of each partition by the equal-radius partitioning method (Figure 8k–m) were not as good as that by the equal-increment partitioning method. Notably, in the fourth partition and the fifth partition located at the edge of the image, the green concentric ring in Figure 8n–o had a larger gray value, while in Figure 9n–o the gray values of pixels in the green concentric ring were approximately 0. This shows that the equal-increment partitioning method had a better performance on eliminating distortion.
Meanwhile, all the lines were used to solve and correct the image distortion as well. Then, the distortion correction effects with and without partition were compared using the aforementioned indexes (Section 4.1). As shown in Table 1, the undistorted images obtained by the two distortion partition methods had a good PSNR of up to 37.61 dB. Compared with the results obtained when without partition, the two partition methods showed a smaller straightness error in each partition. However, compared with the two partitioning methods, the maximum and average errors in the fourth and fifth partitions by the equal-radius partitioning method were at least 4 times and 2 times those by the partitioning method proposed in this paper. That is to say, with the equal-increment partitioning method, each partition can get better distortion correction results. The enlarged image of the best distortion curve for each partition is shown in Figure 10, which validates the effectiveness and accuracy of the proposed partitioning method in 2D settings.
Table 1.
Comparison of distortion correction of the two partition models.
| Indicator | Equal-Radius Partition Model/The Proposed Model | Non-Partitioned Model | ||||
|---|---|---|---|---|---|---|
| Partition 1 | Partition 2 | Partition 3 | Partition 4 | Partition 5 | ||
| Maximum error/pixel | 0.32/0.22 | 0.62/0.41 | 0.77/0.53 | 2.1/0.56 | 2.7/0.55 | 7.46 |
| Average error/pixel | 0.05/0.03 | 0.07/0.06 | 0.10/0.08 | 0.17/0.08 | 0.26/0.10 | 0.52 |
| RMS/pixel | 0.04/0.04 | 0.08/0.06 | 0.10/0.07 | 0.11/0.08 | 0.32/0.09 | 0.48 |
| PSNR/dB | 37.61/37.61 | 37.26/37.26 | 37.10/37.30 | 37.28/37.29 | 37.34/37.33 | 37.53 |
Figure 10.
Distortion curves solved by the lines in each partition using the proposed partition method.
5.2. Accuracy Verification Experiments of DoF Distortion Partitioning Model and Camera Calibration
In this section, the accuracy of the DoF distortion model and camera calibration is verified. The control field is driven to move four different object planes within the DoF, two of which are at the limit positions of the front and rear DoF, and the other two planes are within the DoF. The front object plane was divided into five areas with equal distortion increment of 20.2 pixels. Then, based on the distortion parameters in two object planes with known depths, the distortions in the other two object planes are calculated by the non-partition model, the proposed DoF distortion model with equal-radius partition, and the proposed DoF distortion model with equal-increment distortion partition, respectively. Thereafter, we manually adjusted the ring to focus the lens on the two object planes located at the limit positions of the front and rear DoF. Then, based on the calculated radial and decentering distortion coefficients on the two focal planes, Brown’s model [12] with equal-radius partition is used to estimate distortion parameters on the two planes within the DoF.
Furthermore, the results are compared with the distortion directly solved by the lines (the observed value) within the corresponding partition. To compare the accuracy of different DoF distortion models, we took the in-plane point located in the common area (the second column of Table 2) partitioned by the two models at the same object distance (e.g., 400 mm in the first column of Table 2) as an example. As shown in Table 2, for Brown’s model [12] with equal-radius partition, the maximum and average absolute differences between the calculated and the observed values were 7.32 μm and 2.81 μm, respectively. Those errors are smaller than that of the traditional Zhang’s model without considering the DoF and distortion partition, but much larger than those of the proposed DoF distortion model with equal-radius partition and the proposed DoF distortion model with equal-increment distortion partition, respectively. The maximum and average absolute differences between the calculated and the observed values of the equal-increment distortion partition based DOF distortion model were 1.53 μm and 0.88 μm, respectively. By contrast, the errors of equal-radius partition based DOF distortion model were 4.64 μm and 1.94 μm, which was more than two times those of the proposed model in this paper. The results verified the accuracy of the DoF distortion partitioning model in 3D settings.
Table 2.
Accuracy verification for DoF distortion partition model.
| Position of Object Plane (mm) | In-Plane Position (Distance from the Distorted Point to the Optical Axis) |
Distortion | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Observed Value (μm) |
Brown’s Distortion Model with Equal-Radius Partition | Equal-Radius Partition Based DOF Distortion Model | Equal-Increment Distortion Partition Based DOF Distortion Model | Zhang’s Model | ||||||
| Calculated (μm) | Difference (μm) | Calculated (μm) | Difference (μm) | Calculated (μm) | Difference (μm) | Calculated (μm) | Difference (μm) | |||
| 400 | Point in partition #1 (56 mm) | 86.41 | 86.33 | 0.08 | 86.38 | 0.03 | 86.4 | 0.01 | 86.27 | 0.14 |
| Point in partition #2 (112 mm) |
1836.23 | 1834.12 | 2.11 | 1835.82 | 0.41 | 1836.09 | 0.14 | 1832.42 | 3.81 | |
| Point in partition #3 (168 mm) |
3586.06 | 3582.81 | 3.25 | 3583.7 | 2.36 | 3584.84 | 1.22 | 3581.81 | 4.25 | |
| Point in partition #4 (224 mm) |
5335.88 | 5332.01 | 3.87 | 5333.06 | 2.82 | 5334.57 | 1.31 | 5329.22 | 6.66 | |
| Point in partition #5 (280 mm) |
−7085.71 | −7093.03 | 7.32 | −7090.35 | 4.64 | −7087.05 | 1.34 | −7095.03 | 9.32 | |
| 500 | Point in partition #1 (70 mm) |
51.3 | 51.28 | 0.02 | 51.28 | 0.02 | 51.29 | 0.01 | 51.28 | 0.02 |
| Point in partition #2 (140 mm) |
1468.98 | 1467.93 | 1.05 | 1468.5 | 0.48 | 1468.44 | 0.54 | 1466.8 | 2.18 | |
| Point in partition #3 (210 mm) |
2886.67 | 2884.63 | 2.04 | 2884.27 | 2.40 | 2885.46 | 1.21 | 2883.11 | 3.56 | |
| Point in partition #4 (280 mm) |
4304.35 | 4301.18 | 3.17 | 4301.64 | 2.71 | 4302.82 | 1.53 | 4299.8 | 4.55 | |
| Point in partition #5 (350 mm) |
−5722.03 | −5727.29 | 5.26 | −5725.59 | 4.56 | −5723.55 | 1.52 | −5729.84 | 7.81 | |
Images of circular markers with known precise distance on the planar artifact are collected. The calibration accuracy of the monocular camera is verified by the re-projection errors and the angular reconstruction errors, respectively. Specifically, the planar artifact is driven by the high-accuracy pitch axis to rotate five positions, between two adjacent ones of which are 10°. In each position, the pose matrix between the planar artifact Figure 11a and the calibrated camera is calculated by the OPNP algorithm [38] with the equal-radius and the equal-increment partitioning based DoF distortion models, respectively. Thereafter, 20 markers are projected back to the image via the estimated pose matrix, and the re-projection errors, the image distances between the projected and observed points, are calculated. As shown in Figure 11b, for equal-radius DoF distortion partition model, the maximum and average re-projection errors of the five positions were 0.29 pixels and 0.17 pixels, respectively, while the maximum and average projection errors of the proposed model were 0.11 pixels and 0.05 pixels, respectively. The angle between two adjacent positions of the artifact is reconstructed with the two models as well. As illustrated in Figure 11c, the 3D measurement accuracy of the system is assessed by comparing it with the nominal angle. The results show that the maximum and average angular errors of equal-radius based DoF distortion partition model were 0.48° and 0.30°, respectively, while those of the proposed model were 0.013° and 0.011°, which means that the angular reconstruction errors are effectively reduced. The above results comprehensively verify the accuracy of the DoF distortion partitioning model and the camera calibration method proposed in this paper.
Figure 11.
Camera calibration accuracy verification: (a) artifact; (b) re-projection error; (c) angular reconstruction error.
6. Conclusions
This paper has investigated the methods of modeling and calibration of lens distortions for close-range photogrammetry (e.g., short object distance and small focal length). Our work finds that the following:
-
(1)
A focusing-state-independent DoF distortion model is constructed, and the distortion parameters at any object plane can be solved through the distortion on two defocus planes, which removes the human errors introduced by manual adjustment of the focus and zoom rings.
-
(2)
A 2D-to-3D equal-increment partitioning method for lens distortion is proposed. After fusing with the DoF distortion model to form a DoF distortion partition model, the accuracy of lens distortion characterization is further improved.
-
(3)
A two-step method is proposed to calibrate camera parameters, in which the DoF distortion is calculated independently by the plumb-line method, which eliminated the coupling effect among the parameters in the camera model.
-
(4)
Experiments were performed to verify the accuracy of the 2D distortion partition model, DoF-dependent distortion partition model, and camera calibration. The results show that the maximum and average angular reconstruction errors by the proposed model were 0.013° and 0.011° respectively, which validates the accuracy and feasibility of the equal-increment partitioning based DoF distortion method.
The main limitation of the present study is that the number of partitions is not optimized to achieve higher calibration accuracy. Our future work will focus on this and extend our model to other optical systems with fisheye or catadioptric lenses.
Abbreviations
(List of abbreviations and symbols present in this article)
| Acronym or Symbols | Definition | Acronym or Symbols | Definition |
| DoF | depth of field | -th radial distortion coefficient of the object plane at distance when the lens is focused at the distance of | |
| FoV | field-of-view | -th radial distortion coefficient of the object plane at distance when the lens is focused at the distance of | |
| undistorted coordinates | -th radial distortion coefficient of the object plane at distance when the lens is focused at the distance of | ||
| world coordinate system | decentering distortion function in the defocused plane at the object distances of when the lens is focused at distance | ||
| image coordinate system | decentering distortion function in the defocused plane at the object distances of when the lens is focused at distance | ||
| optical center | decentering distortion function in the defocused plane at the object distances of when the lens is focused at distance | ||
| scaling factor | -th decentering distortion coefficient of the object plane at distance when the lens is focused at the distance of | ||
| intrinsic parameter matrix | -th decentering distortion coefficient of the object plane at distance when the lens is focused at the distance of | ||
| CCD | Charge Coupled Device | -th decentering distortion coefficient of the object plane at distance when the lens is focused at the distance of | |
| CMOS | Complementary Metal-Oxide Semiconductor | maximum value of image distortion | |
| transformation matrix | maximum distortion radius of the image | ||
| VCS | vision coordinate system | length of the image | |
| rotation matrix | height of the image | ||
| translation matrix | minimum distortion value | ||
| distorted coordinates | minimum value of the image distortion radius | ||
| distortion function of an image point in the direction | number of partitions | ||
| the distortion function of an image point in the direction | distortion increment | ||
| distortion center | partition radius | ||
| distortion radius | point in VCS | ||
| first-order coefficient of radial distortion | point in VCS | ||
| second-order coefficient of radial distortion | -th object plane in the VCS | ||
| first-order coefficient of decentering distortion | -th object plane in the VCS | ||
| second-order coefficient of decentering distortion | -th object plane in the VCS | ||
| radial distortion for a lens that is focused on plus infinity | -th order radial distortion coefficient in the -th partition of object plane | ||
| radial distortion for a lens that is focused on minus infinity | -th order decentering distortion coefficient in the -th partition of object plane | ||
| vertical magnification in the focal plane at object distance | -th order radial distortion coefficient in the -th partition of object plane | ||
| lens radial distortion in the focal plane | -th order decentering distortion coefficient in the -th partition of object plane | ||
| radial distortion in the focal plane when the lens is focused on the distance of | -th order radial distortion coefficient in the -th partition of object plane | ||
| radial distortion in the focal plane when the lens is focused on the distance of | -th order decentering distortion coefficient in the -th partition of object plane | ||
| focal length | PnP | Perspective-n-Point | |
| -th radial distortion coefficient for focused object plane at distance | angle between the regression line and the axis | ||
| -th radial distortion coefficient when the lens is focused on the distance of | average sum of squared distances from the points to all the lines | ||
| -th radial distortion coefficient when the lens is focused on the distance of | undistorted image | ||
| component of the decentering distortion in direction | distorted image | ||
| component of the decentering distortion in direction | RMS | root mean square | |
| radial distortion coefficient in the defocused plane with the depth of when the lens is focused at distance | PSNR | Peak Signal-to-Noise Ratio | |
| empirical coefficient | mean square error of the image before and after distortion correction | ||
| radial distortion coefficient in the focal plane at distance | rotation matrix in the -th pose | ||
| radial distortion coefficient in the focal plane at distanced | translation matrix in the -th pose | ||
| radial distortion function of the object plane at distance when the lens is focused at the distance of | -th order radial distortion coefficient in the -th partition of the -th pose | ||
| radial distortion function of the object plane at distance when the lens is focused at the distance of | -th order decentering distortion coefficient in the -th partition of the -th pose | ||
| radial distortion function of the object plane at distance when the lens is focused at the distance of | LM | Levenberg-Marquardt |
Author Contributions
Conceptualization, W.L. and X.L.; formal analysis, X.L.; funding acquisition, W.L. and X.L.; investigation, X.L.; methodology, X.L.; project administration, W.L.; supervision, X.M. and X.Y. (Xiaokang Yin); writing—original draft, X.L.; writing—review & editing, X.Y. (Xin’an Yuan). All authors have read and agreed to the published version of the manuscript.
Funding
This research was funded by the Special National Key Research and Development Plan (No. 2016YFC0802303), National Natural Science Foundation of China (No. 52005513), and the Fundamental Research Funds for the Central Universities (No. 27RA2003015).
Conflicts of Interest
The authors declare no conflict of interest.
Footnotes
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.
References
- 1.Fraser C.S. Automatic camera calibration in close range photogrammetry. Photogramm. Eng. Remote Sens. 2013;79:381–388. doi: 10.14358/PERS.79.4.381. [DOI] [Google Scholar]
- 2.Basu A., Licardie S. Alternative models for fish–eye lenses. Pattern Recognit. Lett. 1995;16:433–441. doi: 10.1016/0167-8655(94)00115-J. [DOI] [Google Scholar]
- 3.Lee H., Han D. Rectification of bowl-shape deformation of tidal flat DEM derived from UAV imaging. Sensors. 2020;20:1602. doi: 10.3390/s20061602. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 4.Drap P., Lefèvre J. An exact formula for calculating inverse radial lens distortions. Sensors. 2016;16:807. doi: 10.3390/s16060807. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 5.Liu M., Sun C., Huang S., Zhang Z. An accurate projector calibration method based on polynomial distortion representation. Sensors. 2015;15:26567–26582. doi: 10.3390/s151026567. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 6.Devernay F., Faugeras O. Straight lines have to be straight. Mach. Vis. Appl. 2001;13:14–24. doi: 10.1007/PL00013269. [DOI] [Google Scholar]
- 7.Fitzgibbon A.W. Simultaneous linear estimation of multiple view geometry and lens distortion; Proceedings of the 2001 IEEE Computer Society Conference on Computer Vision and Pattern Recognition; Kauai, HI, USA. 8–14 December 2001; pp. 125–132. [Google Scholar]
- 8.Alemán-Flores M., Alvarez L., Gomez L., Santana-Cedrés D. Automatic lens distortion correction using one-parameter division models. Image Process. Line. 2014;4:327–343. doi: 10.5201/ipol.2014.106. [DOI] [Google Scholar]
- 9.Claus D., Fitzgibbon A.W. A rational function lens distortion model for general cameras; Proceedings of the 2005 IEEE Computer Society Conference on Computer Vision and Pattern Recognition; San Diego, CA, USA. 20–25 June 2005; pp. 213–219. [Google Scholar]
- 10.Huang J., Wang Z., Xue Q., Gao J. Calibration of camera with rational function lens distortion model. Chin. J. Lasers. 2014;41:0508001. doi: 10.3788/CJL201441.0508001. [DOI] [Google Scholar]
- 11.Brown D.C. Decentering distortion of lenses. Photogramm. Eng. 1966;32:444–462. [Google Scholar]
- 12.Brown D.C. Close–range camera calibration. Photogramm. Eng. 1971;37:855–866. [Google Scholar]
- 13.Tsai R.Y. A versatile camera calibration technique for high–accuracy 3D machine vision metrology using off–the–shelf TV cameras and lenses. IEEE Rob. Autom Mag. 2003;3:323–344. doi: 10.1109/JRA.1987.1087109. [DOI] [Google Scholar]
- 14.Weng J., Cohen P., Herniou M. Camera calibration with distortion models and accuracy evaluation. IEEE Trans. Pattern Anal. Mach. Intell. 1992;14:965–980. doi: 10.1109/34.159901. [DOI] [Google Scholar]
- 15.Kakani V., Kim H., Kumbham M., Park D., Jin C.B., Nguyen V.H. Feasible Self–Calibration of Larger Field–of–View (FOV) Camera Sensors for the Advanced Driver–Assistance System (ADAS) Sensors. 2019;19:3369. doi: 10.3390/s19153369. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 16.Li X., Liu W., Pan Y., Liang B., Zhou M.D., Li H., Wang F.J., Jia Z.Y. Monocular–vision–based contouring error detection and compensation for CNC machine tools. Precis. Eng. 2019;55:447–463. doi: 10.1016/j.precisioneng.2018.10.015. [DOI] [Google Scholar]
- 17.Zhang Z. A flexible new technique for camera calibration. IEEE Trans. Pattern Anal. Mach. Intell. 2000;22:1330–1334. doi: 10.1109/34.888718. [DOI] [Google Scholar]
- 18.Liu W., Ma X., Li X., Pan Y., Wang F.J., Jia Z.Y. A novel vision-based pose measurement method considering the refraction of light. Sensors. 2018;18:4348. doi: 10.3390/s18124348. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 19.Yang J.H., Jia Z.Y., Liu W., Fan C.N., Xu P.T., Wang F.J., Liu Y. Precision calibration method for binocular vision measurement systems based on arbitrary translations and 3D-connection information. Meas. Sci. Technol. 2016;27:105009. doi: 10.1088/0957-0233/27/10/105009. [DOI] [Google Scholar]
- 20.Zhao Z., Zhu Y., Li Y., Qiu Z., Luo Y., Xie C., Zhang Z. Multi-camera-based universal measurement method for 6-DOF of rigid bodies in world coordinate system. Sensors. 2020;20:5547. doi: 10.3390/s20195547. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 21.Prescott B., Mclean G.F. Line–based correction of radial lens distortion. Graph. Models Image Process. 1997;59:39–47. doi: 10.1006/gmip.1996.0407. [DOI] [Google Scholar]
- 22.Ahmed M., Farag A. Nonmetric calibration of camera lens distortion: Differential methods and robust estimation. IEEE Trans. Image Process. 2005;14:1215–1230. doi: 10.1109/TIP.2005.846025. [DOI] [PubMed] [Google Scholar]
- 23.Santana-Cedrés D., Gomez L., Alemán-Flores M., Salgado A., Esclarín J., Mazorra L., Alvarez L. Estimation of the lens distortion model by minimizing a line reprojection error. IEEE Sens. J. 2017;17:2848–2855. doi: 10.1109/JSEN.2017.2677475. [DOI] [Google Scholar]
- 24.Becker S.C., Bove V.M., Jr. Semiautomatic 3D–model extraction from uncalibrated 2D–camera views. Int. Soc. Opt. Photonics. 1995;2410:447–461. [Google Scholar]
- 25.Penna M.A. Camera calibration: A quick and easy way to determine the scale factor. IEEE Trans. Pattern Anal. Mach. Intell. 1991;13:1240–1245. doi: 10.1109/34.107007. [DOI] [Google Scholar]
- 26.Magill A.A. Variation in distortion with magnification. J. Res. Natl. Bur. Stand. 1955;45:148–149. [Google Scholar]
- 27.Fryer J.G. Lens distortion for close–range photogrammetry. Photogramm. Eng. Remote Sens. 1986;52:51–58. [Google Scholar]
- 28.Treibitz T., Schechner Y.Y., Singh H. Flat refractive geometry. IEEE Trans. Pattern. Anal. Mach. Intell. 2012;34:51–65. doi: 10.1109/TPAMI.2011.105. [DOI] [PubMed] [Google Scholar]
- 29.Fraser C.S., Shortis M.R. Variation of distortion within the photographic field. Photogramm. Eng. Remote Sens. 1992;58:851–855. [Google Scholar]
- 30.Dold J. Ph.D. Thesis. Universität der Bundeswehr; München, Germany: 1997. Ein hybrides photogrammetrisches Industriemesssystem höchster Genauigkeit und seiner Überprüfung. Schriftenreihe Studiengang Vermessungswesen, Heft 54. [Google Scholar]
- 31.Brakhage P., Notni G., Kowarschik R. Image aberrations in optical three–dimensional measurement systems with fringe projection. Appl. Opt. 2004;43:3217–3223. doi: 10.1364/AO.43.003217. [DOI] [PubMed] [Google Scholar]
- 32.Hanning T. High precision camera calibration with a depth dependent distortion mapping; Proceedings of the 8th IASTED International Conference on Visualization; Imaging, and Image Processing, Palma de Mallorca, Spain. 1–3 September 2008; pp. 304–309. [Google Scholar]
- 33.Alvarez L., Gómez L., Sendra J.R. Accurate depth dependent lens distortion models: An application to planar view scenarios. J. Math. Imaging Vis. 2011;39:75–85. doi: 10.1007/s10851-010-0226-2. [DOI] [Google Scholar]
- 34.Sun P., Lu N., Dong M. Modelling and calibration of depth–dependent distortion for large depth visual measurement cameras. Opt. Express. 2017;25:9834–9847. doi: 10.1364/OE.25.009834. [DOI] [PubMed] [Google Scholar]
- 35.Ricolfe-Viala C., Esparza A. Depth-dependent high distortion lens calibration. Sensors. 2020;20:3695. doi: 10.3390/s20133695. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 36.Li X., Liu W., Pan Y., Ma J., Wang F. A knowledge–driven approach for 3D high temporal–spatial measurement of an arbitrary contouring error of CNC machine tools using monocular vision. Sensors. 2019;19:744. doi: 10.3390/s19030744. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 37.Lowe D.G. Object recognition from local scale–invariant features; Proceedings of the IEEE Transactions on Pattern Analysis and Machine Intelligence; Kerkyra, Greece. 20–27 September 1999; pp. 51–65. [Google Scholar]
- 38.Zheng Y., Kuang Y., Sugimoto S., Astrom K., Okutomi M. Revisiting the PnP problem: A fast, general and optimal solution; Proceedings of the 2013 IEEE International Conference on Computer Vision; Sydney, NSW, Australia. 1–8 December 2013; pp. 2344–2351. [Google Scholar]













