Correction of image radial distortion based on division model

Abstract. This paper presents an approach for estimating and then removing image radial distortion. It works on a single image and does not require a special calibration. The approach is extremely useful in many applications, particularly those where human-made environments contain abundant lines. A division model is applied, in which a straight line in the distorted image is treated as a circular arc. Levenberg–Marquardt (LM) iterative nonlinear least squares method is adopted to calculate the arc’s parameters. Then “Taubin fit” is applied to obtain the initial guess of the arc’s parameters which works as the initial input to the LM iteration. This dramatically improves the convergence rate in the LM process to obtain the required parameters for correcting image radial distortion. Hough entropy, as a measure, has achieved the quantitative evaluation of the estimated distortion based on the probability distribution in one-dimensional θ Hough space. The experimental results on both synthetic and real images have demonstrated that the proposed method can robustly estimate and then remove image radial distortion with high accuracy.


Introduction
][3][4] In practice, for most lenses, the radial distortion component is predominant. 5,6It 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. 7Radial distortion is the most significant type of distortion in today's cameras. 5,8ethods 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 method [9][10][11][12][13][14] and single view method. 6,7,15,16For multiple views method, the most widely used offline calibration software is the toolbox provided by Jean-Yves Bouguet. 17t 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. 69][20][21][22][23][24][25][26] Bukhari and Dailey 21 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.5][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 method 27 and Smisek's method. 28n 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 model [29][30][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 model 9 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. 13Our 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.

Distortion Models
The Brown model that is most commonly used to describe lens distortion can be written as E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 0 1 ; 6 3 ; 6 4 1 where ðx u ; y u Þ and ðx d ; y d Þ 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 ðx 0 ; y 0 Þ.
According to Zhang, 5 the radial distortion is predominant.The most commonly used radial distortion model can be written as E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 0 2 ; 6 3 ; 5 0 4 supposing that the distorted center ðx 0 ; y 0 Þ 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. 6itzgibbon 9 proposed the division model as E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 0 3 ; 6 3 ; 3 8 8

<
: 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,10In our study, we use the single parameter division model E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 0 4 ; 6 3 ; 2 7 6

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. 6he equation of a straight line is expressed as From Eq. ( 4), we have ; t e m p : i n t r a l i n k -; e 0 0 6 ; 6 3 ; then, we obtain a circle equation ; t e m p : i n t r a l i n k -; e 0 0 7 ; 3 2 6 ; 5 8 3 If ðx 0 ; y 0 Þ is the center of radial distortion, we have ; t e m p : i n t r a l i n k -; e 0 0 8 ; 3 2 6 ; 5 4 0 ; t e m p : i n t r a l i n k -; e 0 0 9 ; 3 2 6 ; 4 4 7 and E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 1 0 ; 3 2 6 ; 4 0 4 Equation ( 9) indicates that a group of parameters ðD; E; FÞ 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 ðD; E; FÞ, the distortion center can be estimated by solving the linear equations of and an estimate of λ can be obtained from E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 1 2 ; 3 2 6 ; 2 3 5 When extracting more than three arcs from an image and determining these parameters ðD; E; FÞ, the parameter ðx 0 ; y 0 ; λÞ 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.

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. 34It uses four parameters to specify a circle: . It minimizes the objective function Ωða; b; c; dÞ where x is the mean of the points' x coordinates, y is the mean of the points' y coordinates, and The objective function for LM fit 35 is Ωðx c ; y c ; rÞ ¼ P N i¼1 ðr i − rÞ 2 , 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. 36The 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 0.3 Ã max(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 ; t e m p : i n t r a l i n k -; e 0 1 3 ; 3 2 6 ; 5 8 4 where Bins is the number of θ discrete bins (we set Bins ¼ 180), and pðH b Þ is the value of probability.

Tests on Synthetic Images
An image in size of 640 × 480 pixels, as shown in Fig. 1, was used as a source image (H ¼ 1).Synthetic images are generated from the source image with given information of the distortion parameters ðx 0 ; y 0 ; λÞ.We performed three series of experiments with synthetic images.

Varying λ
In the first series, synthetic images are obtained with distortion parameters ð320;240; λÞ, with varying λ at different levels (from extreme pincushion to barrel distortion).For a positive λ (pincushion distortion), the size of synthetic images is larger than 640 × 480 pixels, and the distortion center is different from known parameters of ðx 0 ; y 0 ; λÞ.For a negative λ (barrel distortion), the size of synthetic images is 640 × 480 pixels, 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 λ ≥ 5.0 × 10 −6 , we only map the points for which r 2 d ≤ 1∕ð4λÞ, 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 ðx 0 ; y 0 Þ true and ðx 0 ; y 0 Þ estimate .Rel is the relative error for λ, i.e., jðλ estimate − λ true Þ∕λ true j.Dis, λ estimate , and Rel can be found in Table 1.
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 10 −3 to 10 −5 .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 jλj ≥ 6.0 × 10 −7 , Dis are less than 2 pixels.Hough entropy is always equal to 1 except for the extreme case of λ ≥ 5.0 × 10 −6 .For this case, we only map the points for which r 2 d ≤ 1∕ð4λÞ [see Fig. 2(a)].θ is always equal to 0 (or 90) in the Hough space even for the extreme case of λ ≥ 5.0 × 10 −6 , 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 ðλ ¼ −1.0× −6 Þ while varying the distortion center.The synthetic images, corrected images, and the corresponding 1-D Hough transforms are presented in Fig. 3. Dis, λ estimate , and Rel can be found in Table 2.
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 ðx 0 ; y 0 ; λÞ.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 10 −4 to 10 −6 .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 site 37 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 ð320;240; λ ¼ −1.0 × 10 −6 Þ.The synthetic image, corrected images, and the corresponding 1-D Hough transforms are presented in Fig. 4. Dis, ðx 0 ; y 0 Þ estimate , and H 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.

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. 38From 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 method 5 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.

Conclusions
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   rate in the process of the LM iterative nonlinear least squares method to calculate an arc's parameters.

Fig. 3
Fig. 3 Correction of synthetic images (with different distortion center).First column: distorted images.Second column: corresponding 1-D Hough transforms of first column.Third column: corrected images of first column.Fourth column: corresponding 1-D Hough transforms of third column.

Fig. 4
Fig. 4 (a) Synthetic image and corresponding 1-D Hough transforms.(b) Corrected image of (a) which generated from Alvarez's method and corresponding 1-D Hough transforms.(c) Corrected image of (a) which generated from the proposed method and corresponding 1-D Hough transforms.
) 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

Fig. 5
Fig. 5 Correction of real images.Some lines that are straight in the world have been annotated with red straight lines in the corrected image, showing strong vanishing points.(a) (b) (c) (d) (g) are building, (e) bedroom, (f) solar power plant, and (h) the ceiling of corridor.

Table 1
Estimated results of the synthetic images from Fig.2.

Table 2
Estimated results of the synthetic images from Fig.3.
• Vol.56(1) Wu, Wei, and Wang: Correction of image radial distortion based on division model

Table 3
Results comparison of the synthetic image from Fig. 4.