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.1822.214.171.124.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)||−0.9993661×10−6||6.3387×10−4||(302.0406, 220.5043)||2.1019||−0.9997905×10−6||2.0946×10−4||(301.1228, 219.5050)||1.2271||1|
|(300, 260)||−0.9997047×10−6||2.9529×10−4||(301.7350, 259.7820)||1.7486||−1.0000697×10−6||6.974×10−5||(300.9076, 259.0131)||1.3408||1|
|(340, 220)||−1.0040027×10−6||4.00267×10−3||(337.1097, 219.6016)||2.9176||−1.0002655×10−6||2.6555×10−4||(338.4051, 219.1870)||1.7902||1|
|(340, 260)||−1.0036289×10−6||3.62891×10−3||(337.0461, 258.7703)||3.1997||−0.9997154×10−6||2.8457×10−4||(337.7498, 259.1804)||2.3948||1|
|(240, 160)||−1.0012700×10−6||1.27000×10−3||(239.0277, 159.8959)||0.9778||−0.9996601×10−6||3.3993×10−4||(237.9878, 158.7605)||2.3633||1|
|(240, 320)||−0.9969717×10−6||3.02829×10−3||(239.9595, 319.4118)||0.5896||−1.0000098×10−6||9.84×10−6||(238.2006, 320.1384)||1.8048||1|
|(400, 160)||−1.0028122×10−6||2.81218×10−3||(399.3107, 159.8861)||0.6987||−0.9998814×10−6||1.1862×10−4||(398.1673, 159.2641)||1.9749||1|
|(400, 320)||−1.0023331×10−6||2.33315×10−3||(398.8879, 317.7069)||2.5486||−1.0000925×10−6||9.248×10−5||(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).
J. H. Brito et al., “Radial distortion self-calibration,” in Proc. of the IEEE Conf. on Computer Vision and Pattern Recognition (CVPR ‘13), pp. 1368–1375 (2013).http://dx.doi.org/10.1109/CVPR.2013.180Google Scholar
F. Wu et al., “Deep space exploration panoramic camera calibration technique based on circular markers,” Acta Opt. Sin. 33(11), 1115002 (2013).GUXUDC0253-2239http://dx.doi.org/10.3788/AOSGoogle Scholar
A. Wang, T. Qiu and L. Shao, “A simple method of radial distortion correction with centre of distortion estimation,” J. Math. Imaging Vision 35(3), 165–172 (2009).http://dx.doi.org/10.1007/s10851-009-0162-1Google Scholar
Z. Kukelova and T. Pajdla, “A minimal solution to radial distortion autocalibration,” IEEE Trans. Pattern Anal. Mach. Intell. 33(12), 2410–2422 (2011).ITPIDJ0162-8828http://dx.doi.org/10.1109/TPAMI.2011.86Google Scholar
A. W. Fitzgibbon, “Simultaneous linear estimation of multiple view geometry and lens distortion,” in Proc. of the 2001 IEEE Computer Society Conf. on Computer Vision and Pattern Recognition (CVPR ’01), pp. 125–132 (2001).http://dx.doi.org/10.1109/CVPR.2001.990465Google Scholar
D. Claus and A. W. Fitzgibbon, “A rational function lens distortion model for general cameras,” in IEEE Computer Society Conf. on Computer Vision and Pattern Recognition (CVPR ’05), pp. 213–219 (2005).http://dx.doi.org/10.1109/CVPR.2005.43Google Scholar
G. P. Stein, “Lens distortion calibration using point correspondences,” in Proc., 1997 IEEE Computer Society Conf. on Computer Vision and Pattern Recognition, pp. 602–608 (1997).http://dx.doi.org/10.1109/CVPR.1997.609387Google Scholar
B. Micusik and T. Pajdla, “Structure from motion with wide circular field of view cameras,” IEEE Trans. Pattern Anal. Mach. Intell. 28(7), 1135–1149 (2006).ITPIDJ0162-8828http://dx.doi.org/10.1109/TPAMI.2006.151Google Scholar
R. Hartley and S. B. Kang, “Parameter-free radial distortion correction with center of distortion estimation,” IEEE Trans. Pattern Anal. Mach. Intell. 29(8), 1309–1321 (2007).ITPIDJ0162-8828http://dx.doi.org/10.1109/TPAMI.2007.1147Google Scholar
S. Ramalingam, P. Sturm and S. K. Lodha, “Generic self-calibration of central cameras,” Comput. Vision Image Understanding 114(2), 210–219 (2010).CVIUF41077-3142http://dx.doi.org/10.1016/j.cviu.2009.07.007Google Scholar
M. Ahmed and A. Farag, “Nonmetric calibration of camera lens distortion: differential methods and robust estimation,” IEEE Trans. Image Process. 14(8), 1215–1230 (2005).IIPRE41057-7149http://dx.doi.org/10.1109/TIP.2005.846025Google Scholar
F. C. M. Alanis and J. A. M. Rodriguez, “Self-calibration of vision parameters via genetic algorithms with simulated binary crossover and laser line projection,” Opt. Eng. 54(5), 053115 (2015).http://dx.doi.org/10.1117/1.OE.54.5.053115Google Scholar
J. P. Barreto, “A unifying geometric representation for central projection systems,” Comput. Vision Image Understanding 103(3), 208–217 (2006).CVIUF41077-3142http://dx.doi.org/10.1016/j.cviu.2006.06.003Google Scholar
M. Aleman-Flores et al., “Line detection in images showing significant lens distortion and application to distortion correction,” Pattern Recognit. Lett. 36, 261–271 (2014).PRLEDG0167-8655http://dx.doi.org/10.1016/j.patrec.2013.06.020Google Scholar
D. Santana-Cedres et al., “Invertibility and estimation of two-parameter polynomial and division lens distortion models,” SIAM J. Imaging Sci. 8(3), 1574–1606 (2015).http://dx.doi.org/10.1137/151006044Google Scholar
C. Herrera, J. Kannala and J. Heikkila, “Joint depth and color camera calibration with distortion correction,” IEEE Trans. Pattern Anal. Mach. Intell. 34(10), 2058–2064 (2012).ITPIDJ0162-8828http://dx.doi.org/10.1109/TPAMI.2012.125Google Scholar
J. Smisek, M. Jancosek and T. Pajdla, “3D with Kinect,” in IEEE Int. Conf. on Computer Vision Workshops (ICCV Workshops ‘11), pp. 1154–1160 (2011).http://dx.doi.org/10.1109/ICCVW.2011.6130380Google Scholar
D. C. Brown, “Decentering distortion of lenses,” Photometric Eng. 32(3), 444–462 (1966).Google Scholar
D. C. Brown, “Close-range camera calibration,” Photogramm. Eng. 37(8), 855–866 (1971).Google Scholar
J. G. Fryer and D. C. Brown, “Lens distortion for close-range photogrammetry,” Photogramm. Eng. Remote Sens. 52(1), 51–58 (1986).Google Scholar
R. Y. Tsai, “A versatile camera calibration technique for high-accuracy 3D machine vision metrology using off-the-shelf TV cameras and lenses,” IEEE J. Rob. Autom. 3(4), 323–344 (1987).IJRAE40882-4967http://dx.doi.org/10.1109/JRA.1987.1087109Google Scholar
G. Taubin, “Estimation of planar curves, surfaces and nonplanar space curves defined by implicit equations with applications to edge and range image segmentation,” IEEE Trans. Pattern Anal. Mach. Intell. 13(11), 1115–1138 (1991).ITPIDJ0162-8828http://dx.doi.org/10.1109/34.103273Google Scholar
N. Chernov, Circular and Linear Regression: Fitting Circles and Lines by Least Squares, Chapman & Hall/CRC, Boca Raton, Florida (2010).Google Scholar
R. O. Duda and P. E. Hart, “Use of the Hough transformation to detect lines and curves in pictures,” Commun. ACM 15(1), 11–15 (1972).CACMA20001-0782http://dx.doi.org/10.1145/361237.361242Google Scholar
L. Alvarez, L. Gómez and J. R. Sendra, “Algebraic lens distortion model estimation,” 29 September 2015, http://demo.ipol.im/demo/ags_algebraic_lens_distortion_estimation/ (25 March 2016).Google Scholar
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.