Lens distortion is usually classified into three types: radial distortion, decentering distortion, and thin prism distortion.12.3.–4 In practice, for most lenses, the radial distortion component is predominant.5,6 It may appear as a barrel distortion or pincushion distortion. Radial distortion bends straight lines into circular arcs,6 violating the main invariance preserved in the pinhole camera model, in which straight lines in the world map to straight lines in the image plane.7 Radial distortion is the most significant type of distortion in today’s cameras.5,8
Methods used for obtaining the parameters in the radial distortion function for correcting the distorted images can be divided roughly into two major categories: multiple views method910.11.12.13.–14 and single view method.6,7,15,16 For multiple views method, the most widely used offline calibration software is the toolbox provided by Jean-Yves Bouguet.17 It can process calibration after the image is imported with a lens distortion model that includes seven parameters which are sufficient for most kinds of cameras. Although the fact that the multiple views method does not require a special condition in the scene, for example, straight lines, making it have a wide range of applications, the disadvantage of this method is that it does require multiple images which are not available in many cases, to conduct the process.6 In the past decades, many methods for radial distortion estimation have been proposed in research.18188.8.131.52.23.24.25.–26 Bukhari and Dailey21 proposed a method for automatic radial distortion estimation based on the plumb-line approach. They compared statistical analyses of how different circle fitting methods contribute to accurate distortion parameter estimation. They provide qualitative results on a wide variety of challenging real images. Alvarez et al.22,23 proposed an algebraic approach to the estimation of the lens distortion parameters based on the rectification of lines in the image. The lens distortion parameters are obtained by minimizing a four total-degree polynomial in several variables. Lens distortion is estimated by the division model using one parameter, which allows stating the problem into the Hough transform scheme by adding a distortion parameter to better extract straight lines from the image.2425.–26 RGB-D cameras, such as the Microsoft Kinect, have become very widely used in perceptual computing applications. To utilize the full potential of RGB-D devices, calibration must be performed to determine the intrinsic and extrinsic parameters of the color and depth sensors and to reduce lens and depth distortion. Early work for calibration of RGB-D devices includes Herrera’s method27 and Smisek’s method.28
In this study, our method based on the use of distorted straight lines falls in the second category. The method works on a single image in which at least three distorted straight lines exist and does not require a calibration pattern. The Brown model2930.31.32.–33 is most commonly used to describe lens distortion, and it works best for lens with small distortions. However, when the distortion becomes large, it may not be satisfactory. We use Fitzgibbon’s division model9 of radial distortion with a single parameter. The division model is capable of expressing large distortion at a much lower order. Hartley and Kang argued that the usual assumption that the distortion center is at the image center is not safe.13 Our method also computes the center of radial distortion, which is important in obtaining optimal results.
The rest of this paper is structured as follows. Section 2 describes the distortion model and the estimation of distortion parameters. In Sec. 3, a detailed quantitative study is presented of the performance evaluation on both synthetic and real images. Finally, this paper comes to conclusions in Sec. 4.
The Brown model that is most commonly used to describe lens distortion can be written as
According to Zhang,5 the radial distortion is predominant. The most commonly used radial distortion model can be written as6
Fitzgibbon9 proposed the division model as
The most remarkable advantage of the division model over the Brown model is that it is able to express a large distortion at a much lower order. In particular, for many cameras, a single parameter would suffice.9,10 In our study, we use the single parameter division model
Distortion of a Straight Line
Under the single parameter division model, the distorted image of a straight line can be treated as a circular arc.6 The equation of a straight line is expressed as
From Eq. (4), we have
If is the center of radial distortion, we have
Let , , , then, we have
Method of Circle Fitting
To find arcs, we first extract edges using the Canny operator. Then we track all the edge points associated with a starting point. From a given starting point, we track in one direction, storing the coordinates of the edge points in an array and label the pixels in the edge image. When no more connected points are found, we return to the start point and track in the opposite direction. Finally, a check for the overall number of edge points found is made and the edge is ignored if it is too short.
After the initial arc identification process, an initial guess of parameters is assigned to each resulting arc, followed by the LM iterative nonlinear least squares method to produce the optimized parameters. Taubin fit is used for the initial guess.34 It uses four parameters to specify a circle: , with . The center of the circle is and the radius is given by . It minimizes the objective function , subject to the constraint that , where is the mean of the points’ coordinates, is the mean of the points’ coordinates, and . The objective function for LM fit35 is , where .
Result and Discussion
Experiments were carried out on both synthetic and real image data. The performance evaluation of the proposed approach was conducted. We use Hough entropy to evaluate the quality of recovering distorted synthetic images. The Hough transform is a technique that can find lines in images.36 The basis of the technique is the transform of a line to a point in a Hough space. A line is represented by a single point in the two-dimensional (2-D) Hough space of , in which the values of these points vary. In our case, a specified threshold is set empirically as (Hough space) to obtain all peaks which represents lines. A straight line in the distorted image is treated as a circular arc and we only use the values of to measure the straightness. So transform the 2-D Hough space of to a one-dimensional (1-D) space by summing over the values for each , then the Hough entropy is defined as
Tests on Synthetic Images
An image in size of , as shown in Fig. 1, was used as a source image (). Synthetic images are generated from the source image with given information of the distortion parameters . We performed three series of experiments with synthetic images.
In the first series, synthetic images are obtained with distortion parameters , with varying at different levels (from extreme pincushion to barrel distortion). For a positive (pincushion distortion), the size of synthetic images is larger than pixels, and the distortion center is different from known parameters of . For a negative (barrel distortion), the size of synthetic images is , and the distortion center is fixed at (320, 240). The synthetic images, corrected images, and the corresponding 1-D Hough transforms are shown in Fig. 2. For the extreme case of , we only map the points for which , resulting in a circular valid region around the image center.
As shown in Fig. 2, the proposed method works very well for all distortion parameters in the test interval and remove image radial distortion with high accuracy. Estimated results of distortion parameters and Hough entropy of corrected images are shown in Table 1. The initial estimation only extracts three arcs which have maximum distortion, and the estimation based on the LM method extracts sixteen arcs which also have maximum distortion. Dis is the Euclidean distance between and . Rel is the relative error for , i.e., . Dis, , and Rel can be found in Table 1.
Estimated results of the synthetic images from Fig. 2.
|λtrue||Initial estimate||Estimate by LM method||H|
From Table 1, we can see that the proposed approach produces convincing distortion parameters which are very close to the true distortion parameters used for generating the synthetic images. This method is very robust even at extreme cases. Table 1 also shows that the LM method provides better estimates than the three arcs methods. Although the LM method may slightly increase Dis, it has dramatically reduced Rel. The results in terms of relative estimation error for in Table 1 show quite clearly that our method is extremely accurate at estimating , the estimated results of Rel based on the LM method at the range of to . Rel increases when is close to zero, which reflects the following factor: since the true value is extremely small, small deviations between the estimated and true parameter values give relatively large errors. Table 1 shows quite clearly that the estimated results of Dis based on the LM method are less than 8 pixels. Furthermore in the case of , Dis are less than 2 pixels. Hough entropy is always equal to 1 except for the extreme case of . For this case, we only map the points for which [see Fig. 2(a)]. is always equal to 0 (or 90) in the Hough space even for the extreme case of , which shows that our method is robust. Real images may not contain too many distorted straight line. Fortunately, the results in Table 1 show quite clearly that the initial estimation only extracting three arcs which have satisfactory accuracy.
Varying distortion center
In the second series, synthetic images are obtained with the distortion fixed at a moderate level of barrel distortion while varying the distortion center. The synthetic images, corrected images, and the corresponding 1-D Hough transforms are presented in Fig. 3. Dis, , and Rel can be found in Table 2.
Estimated results of the synthetic images from Fig. 3.
|(x0,y0)true||Initial estimate||Estimate by LM method||H|
|(300, 220)||(302.0406, 220.5043)||2.1019||(301.1228, 219.5050)||1.2271||1|
|(300, 260)||(301.7350, 259.7820)||1.7486||(300.9076, 259.0131)||1.3408||1|
|(340, 220)||(337.1097, 219.6016)||2.9176||(338.4051, 219.1870)||1.7902||1|
|(340, 260)||(337.0461, 258.7703)||3.1997||(337.7498, 259.1804)||2.3948||1|
|(240, 160)||(239.0277, 159.8959)||0.9778||(237.9878, 158.7605)||2.3633||1|
|(240, 320)||(239.9595, 319.4118)||0.5896||(238.2006, 320.1384)||1.8048||1|
|(400, 160)||(399.3107, 159.8861)||0.6987||(398.1673, 159.2641)||1.9749||1|
|(400, 320)||(398.8879, 317.7069)||2.5486||(398.1597, 319.5542)||1.8935||1|
As shown in Fig. 3, the proposed method works very well for all distortion parameters in the test interval and removes image radial distortion with high accuracy. From Table 2, we can see that our method gives good results about the distortion parameter . The results in terms of relative estimation error for in Table 2 show quite clearly that our method is extremely accurate at estimating , and for estimated results of Rel based on the LM method at the range of to . The estimated results of Dis based on the LM method are less than 3 pixels. Hough entropy is always equal to 1, which shows that our method is robust.
Comparison to another technique
To gauge the accuracy of our method, we have compared it to the method developed by Alvarez et al.22,23 Alvarez et al. have deployed a demo web site37 for their method that allows users to submit an image for removing distortion after manually selecting distorted lines from it. For a fair comparison, the same three lines were used in both Alvarez’s method and our method. A synthetic image was generated from the source image with given information of distortion parameters . The synthetic image, corrected images, and the corresponding 1-D Hough transforms are presented in Fig. 4. Dis, , and can be found in Table 3. Compared to the source image (Fig. 1), the content of the corrected image [Fig. 4(b)] which generated from Alvarez’s method is zoomed out, and content of the corrected image [Fig. 4(c)] which is generated from the proposed method is unchanged. As shown in Fig. 4, the proposed method outperforms Alvarez’s method in terms of visual qualities. From Table 3, we can see quantitatively that the proposed method has dramatically reduced Dis, and the Hough entropy is equal to the source image. Moreover, compared to Alvarez’s method which requires manual intervention to select distorted straight lines, the proposed method requires much less processing time.
Results comparison of the synthetic image from Fig. 4.
|Alvarez et al.||(330.0076, 235.0030)||11.1858||1.7206|
Tests on Real Images
The original tested real images and corrected images are shown in Fig. 5, the original image of (a)–(g) are obtained from the Image Processing on Line website.38 From Fig. 5, we can obviously observe the distortion (left in a pair) as well as correction (right in a pair). These results demonstrated that the radial distortion has been successfully removed in the recovered images. It shows the robustness and accuracy of the proposed approach in the radial distortion correction.
For the quantitative evaluation, we have compared the proposed method to Zhang’s method5 and Alvarez’s method. For Zhang’s method, it has to use a calibration pattern (checkerboard with black-and-white squares) to estimate the camera’s intrinsic parameters, therefore, its process takes a much longer time. For the comparison of Alvarez’s method and the proposed method, the same three distorted lines were taken for the purpose. The real image, corrected images, and the corresponding 1-D Hough transforms are presented in Fig. 6. As expected, the proposed method outperforms Zhang’s method and Alvarez’s method in terms of visual qualities. Compared to Zhang’s method which involves camera calibration and Alvarez’s method which requires manual intervention to select distorted straight lines, the proposed method is much faster in terms of processing time. The probability distribution in 1-D Hough space in Fig. 6(d) shows that our method is much more uniform at 0 deg and 180 deg compared to those in Figs. 6(b) and 6(c). This means that the proposed method has a more satisfactory result in removing image radial distortion.
In this paper, we proposed an approach for correcting image radial distortion caused by lens. This method works on a single image and does not require a special calibration pattern. Experimental results have shown a significant achievement in correcting image radial distortion in both synthetic and real images. The key contributions of the study can be summarized in three aspects. (1) The proposed method is accurate and robust in estimating radial distortion. It is extremely useful in many applications, particularly for those where human-made environments contain abundant lines. Although the proposed method requires at least three distorted lines residing in an image, it can cope with a situation in which fewer lines are found by adding more images taken by a same camera with different capturing angles. As long as there is a line involved in the scene, the proposed method is applicable. (2) The quantitative evaluation of the estimated radial distortion parameters has been achieved by the defined measure of Hough entropy based on the probability distribution in 1-D Hough space. (3) The “Taubin fit” technique has shown its positive effect in the initial guess of an arc’s parameters. It has significantly improved the convergence rate in the process of the LM iterative nonlinear least squares method to calculate an arc’s parameters.
This work was supported by the National Natural Science Foundation of China (Grant No. 51575388).
Fanlu Wu received his BS degree from the School of Opto-Electronic Engineering, Changchun University of Science and Technology, China, in 2011 and his MS degree from the University of the Chinese Academy of Sciences, China, in 2014. He is currently pursuing his PhD in the School of Precision Instrument and Opto-Electronics Engineering, Tianjin University, China. His research interests include camera calibration, image mosaics, and image super-resolution reconstruction.
Hong Wei received her PhD from Birmingham University in 1996. She worked as a postdoctoral research assistant on a Hewlett Packard sponsored project, high-resolution CMOS camera systems. She also worked as a research fellow on an EPSRC-funded Faraday project, model from movies. She joined the University of Reading in 2000. Her current research interest includes intelligent computer vision and its applications in remotely sensed images and face recognition (biometric).
Xiangjun Wang received his BS, MS, and PhD degrees in precision measurement technology and instruments from Tianjin University, China, in 1980, 1985, and 1990, respectively. Currently, he is a professor and director of the precision measurement system research group at Tianjin University. His research interests include photoelectric sensors and testing, computer vision, image analysis, MOEMS, and MEMS.