|
1.IntroductionLens distortion is usually classified into three types: radial distortion, decentering distortion, and thin prism distortion.1–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 method9–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.18–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.24–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 model29–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. 2.Methodology2.1.Distortion ModelsThe Brown model that is most commonly used to describe lens distortion can be written as where and are the corresponding coordinates of an undistorted point and a distorted point in an image, respectively. is the Euclidean distance of the distorted point to the distortion center .According to Zhang,5 the radial distortion is predominant. The most commonly used radial distortion model can be written as supposing that the distorted center is the center of the image. This model works best for lenses with small distortions. However, when the distortion becomes large, it may not be satisfactory and many other factors have to be taken into account in practice.6Fitzgibbon9 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 2.2.Distortion of a Straight LineUnder 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 then, we obtain a circle equationIf is the center of radial distortion, we have Let , , , then, we have and Equation (9) indicates that a group of parameters can be determined by fitting a circle to an arc which is extracted from the image. The circular arc in the image is projected from a straight line in the world. By extracting at least three arcs and determining three groups of parameters , the distortion center can be estimated by solving the linear equations of and an estimate of can be obtained from When extracting more than three arcs from an image and determining these parameters , the parameter can be obtained based on the Levenberg–Marquardt (LM) scheme. Although the 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 the same camera with different capturing angles. As long as there is a line involved in the scene, the method is applicable.2.3.Method of Circle FittingTo 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 . 3.Result and DiscussionExperiments 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 where Bins is the number of discrete bins (we set ), and is the value of probability.3.1.Tests on Synthetic ImagesAn 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. 3.1.1.VaryingIn 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. Table 1Estimated results of the synthetic images from Fig. 2.
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. 3.1.2.Varying distortion centerIn 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. Table 2Estimated results of the synthetic images from Fig. 3.
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. 3.1.3.Comparison to another techniqueTo 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. Table 3Results comparison of the synthetic image from Fig. 4.
3.2.Tests on Real ImagesThe 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. 4.ConclusionsIn 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. AcknowledgmentsThis work was supported by the National Natural Science Foundation of China (Grant No. 51575388). ReferencesJ. H. Brito et al.,
“Radial distortion self-calibration,”
in Proc. of the IEEE Conf. on Computer Vision and Pattern Recognition (CVPR ‘13),
1368
–1375
(2013). http://dx.doi.org/10.1109/CVPR.2013.180 Google Scholar
M. R. Bax and R. Shahidi,
“Real-time lens distortion correction: speed, accuracy and efficiency,”
Opt. Eng., 53
(11), 113103
(2014). http://dx.doi.org/10.1117/1.OE.53.11.113103 Google Scholar
J. Wang et al.,
“A new calibration model of camera lens distortion,”
Pattern Recognit., 41
(2), 607
–615
(2008). http://dx.doi.org/10.1016/j.patcog.2007.06.012 PTNRA8 0031-3203 Google Scholar
F. Wu et al.,
“Deep space exploration panoramic camera calibration technique based on circular markers,”
Acta Opt. Sin., 33
(11), 1115002
(2013). http://dx.doi.org/10.3788/AOS GUXUDC 0253-2239 Google Scholar
Z. Zhang,
“A flexible new technique for camera calibration,”
IEEE Trans. Pattern Anal. Mach. Intell., 22
(11), 1330
–1334
(2000). http://dx.doi.org/10.1109/34.888718 ITPIDJ 0162-8828 Google 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-1 Google Scholar
F. Devernay and O. Faugeras,
“Straight lines have to be straight,”
Mach. Vision Appl., 13
(1), 14
–24
(2001). http://dx.doi.org/10.1007/PL00013269 Google Scholar
Z. Kukelova and T. Pajdla,
“A minimal solution to radial distortion autocalibration,”
IEEE Trans. Pattern Anal. Mach. Intell., 33
(12), 2410
–2422
(2011). http://dx.doi.org/10.1109/TPAMI.2011.86 ITPIDJ 0162-8828 Google 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),
125
–132
(2001). http://dx.doi.org/10.1109/CVPR.2001.990465 Google 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),
213
–219
(2005). http://dx.doi.org/10.1109/CVPR.2005.43 Google Scholar
G. P. Stein,
“Lens distortion calibration using point correspondences,”
in Proc., 1997 IEEE Computer Society Conf. on Computer Vision and Pattern Recognition,
602
–608
(1997). http://dx.doi.org/10.1109/CVPR.1997.609387 Google 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). http://dx.doi.org/10.1109/TPAMI.2006.151 ITPIDJ 0162-8828 Google 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). http://dx.doi.org/10.1109/TPAMI.2007.1147 ITPIDJ 0162-8828 Google Scholar
S. Ramalingam, P. Sturm and S. K. Lodha,
“Generic self-calibration of central cameras,”
Comput. Vision Image Understanding, 114
(2), 210
–219
(2010). http://dx.doi.org/10.1016/j.cviu.2009.07.007 CVIUF4 1077-3142 Google Scholar
B. Precott and G. F. McLean,
“Line-based correction of radial lens distortion,”
Graphical Models Image Process., 59
(1), 39
–47
(1997). http://dx.doi.org/10.1006/gmip.1996.0407 Google 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). http://dx.doi.org/10.1109/TIP.2005.846025 IIPRE4 1057-7149 Google Scholar
Jean-Yves Bouguet, “Camera calibration toolbox for MATLAB,”
(2015) http://www.vision.caltech.edu/bouguetj/calib_doc/ October 2016). Google Scholar
D. Li, G. Wen and S. Qiu,
“Cross-ratio-based line scan camera calibration using a planar pattern,”
Opt. Eng., 55
(1), 014104
(2016). http://dx.doi.org/10.1117/1.OE.55.1.014104 Google 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.053115 Google Scholar
J. P. Barreto,
“A unifying geometric representation for central projection systems,”
Comput. Vision Image Understanding, 103
(3), 208
–217
(2006). http://dx.doi.org/10.1016/j.cviu.2006.06.003 CVIUF4 1077-3142 Google Scholar
F. Bukhari and M. N. Dailey,
“Automatic radial distortion estimation from a single image,”
J. Math. Imaging Vision, 45
(1), 31
–45
(2013). http://dx.doi.org/10.1007/s10851-012-0342-2 Google Scholar
L. Alvarez et al.,
“An algebraic approach to lens distortion by line rectification,”
J. Math. Imaging Vision, 35
(1), 36
–50
(2009). http://dx.doi.org/10.1007/s10851-009-0153-2 Google Scholar
L. Alvarez, L. Gomez and J. R. Sendra,
“Algebraic lens distortion model estimation,”
Image Process. On Line, 1 1
–10
(2010). http://dx.doi.org/10.5201/ipol.2010.ags-alde Google Scholar
M. Aleman-Flores et al.,
“Automatic lens distortion correction using one-parameter division models,”
Image Process. On Line, 4 327
–343
(2014). http://dx.doi.org/10.5201/ipol.2014.106 Google 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). http://dx.doi.org/10.1016/j.patrec.2013.06.020 PRLEDG 0167-8655 Google 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/151006044 Google 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). http://dx.doi.org/10.1109/TPAMI.2012.125 ITPIDJ 0162-8828 Google Scholar
J. Smisek, M. Jancosek and T. Pajdla,
“3D with Kinect,”
in IEEE Int. Conf. on Computer Vision Workshops (ICCV Workshops ‘11),
1154
–1160
(2011). http://dx.doi.org/10.1109/ICCVW.2011.6130380 Google 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). http://dx.doi.org/10.1109/JRA.1987.1087109 IJRAE4 0882-4967 Google Scholar
T. A. Clarke and J. G. Fryer,
“The development of camera calibration methods and models,”
Photogrammetric Rec., 16
(91), 51
–66
(1998). http://dx.doi.org/10.1111/phor.1998.16.issue-91 Google 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). http://dx.doi.org/10.1109/34.103273 ITPIDJ 0162-8828 Google 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). http://dx.doi.org/10.1145/361237.361242 CACMA2 0001-0782 Google Scholar
L. Alvarez, L. Gómez and J. R. Sendra,
“Algebraic lens distortion model estimation,”
(2015) http://demo.ipol.im/demo/ags_algebraic_lens_distortion_estimation/ September 2016). Google Scholar
BiographyFanlu 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. |