A Simple Method of Radial Distortion Correction with Centre of Distortion Estimation Outline • • • • • Introduction Model and Approach Further Discussion Experiments and Results Conclusions Introduction • Lens distortion usually can be classified into three types : – radial distortion (predominant) – decentering distortion – thin prism distortion Wang, J., Shi, F., Zhang, J., Liu, Y.: A new calibration model and method of camera lens distortion. Introduction • Method of obtaining the parameters of the radial distortion function and correcting the images. These previous works can be divided roughly into two strategic approaches – multiple views method – Single view method Introduction Correct the radial distortion • Former approach – based on the collinearity of undistorted points. – Need the camera intrinsic parameters and 3D-point correspondences. • This paper – based on single images and the conclusion that distorted points are concyclic and uses directly the distorted points. – uses the constraint, that straight lines in the 3D world project to circular arcs in the image plane, under the single parameter Division Model Model and Approach • Radial Distortion Models – PMγDM • Distorted straight line is a circle • calibration procedure to estimate the center and the parameter of the radial distortion – Circle fitting : LSγLM Radial Distortion Models π₯π , π¦π βΆ distorted image point π₯π’ , π¦π’ βΆ undistorted image point • The Polynomial Model (PM) that describe radial distortion : ππ’ = ππ 1 + λ1 ππ 2 + λ2 ππ 4 + β― (1) ππ’ βΆ distances of π₯π’ , π¦π’ to the distorted centre π ππ βΆ distances of π₯π , π¦π to the distorted centre π λπ βΆ radial distortion parameter Radial Distortion Models • The Division Model (DM) that describe radial distortion : ππ’ = ππ 1+λ1 ππ 2 +λ2 ππ 4 +β― (2) • we use single parameter Division Model as our distortion model : ππ’ = ππ 1+λ ππ 2 (3) Radial Distortion Models • To simplify equation, we suppose distorted center π is the origin image coordinates system, thus : P (0,0) π₯π’ = π₯π 1+λ ππ 2 , π¦π’ = π¦π 1+λ ππ 2 where ππ 2 = π₯π 2 + π¦π 2 (4) The Figure of Distorted Straight Line • We consider collinear points and their distorted images. • Let π¦π’ = ππ₯π’ + π straight line equation from (4) We have π¦π 1+λππ 2 =π π₯π 1+λππ 2 +π (5) π¦π = ππ₯π + π + πλ π₯π 2 + π¦π 2 (6) π π₯π πλ (7) 2 2 π₯π + π¦π + − 1 π¦π πλ 1 λ + =0 The Figure of Distorted Straight Line 2 π₯π + π¦π 2 π + π₯π πλ − 1 π¦π πλ 1 + λ =0 (7) • The graphics of distorted “straight line” is a circle under the condition of model (3) we use single parameter Division Model as our distortion model : ππ ππ’ = (3) 2 1+λ ππ Estimate the π and λ • Let π₯0 , π¦0 be the coordinates of the distorted center π. From (7) , we have 2 π₯π − π₯0 1 − πλ 2 π₯π + π¦π + π¦π − π¦0 2 + 1 λ π πλ π₯π − π₯0 π¦π − π¦0 + = 0 2 2 (8) π 1 + − 2π₯0 π₯π + − − 2π¦0 π¦π πλ πλ 2 +π₯0 + π¦0 − π π₯ πλ 0 + 1 π¦ πλ 0 1 λ + =0 (9) Estimate the π and λ 2 π₯π + π¦π 2 π 1 + − 2π₯0 π₯π + − − 2π¦0 π¦π πλ πλ 2 2 +π₯0 + π¦0 − Let A= π πλ π π₯ πλ 0 + 1 π¦ πλ 0 − 2π₯0 , π΅ = 2 2 πΆ = π₯0 + π¦0 − 1 λ + =0 1 − πλ π π₯0 πλ + (9) − 2π¦0 1 π¦0 πλ 1 + λ π₯π 2 + π¦π 2 + π΄π₯π + π΅π¦π + πΆ = 0 , we have (10) Estimate the π and λ Let π 1 A = − 2π₯0 , π΅ = − − 2π¦0 πλ πλ π 1 1 2 2 πΆ = π₯0 + π¦0 − π₯0 + π¦0 + πλ πλ λ , we have π₯π 2 + π¦π 2 + π΄π₯π + π΅π¦π + πΆ = 0 (10) Base on the relation of π΄, π΅, and πΆ , we have (εζΉη¨εΌεζΈAγBγC θ radial distortion εζΈ Pγλ ηιδΏεΌ) 2 2 1 λ π₯0 + π¦0 + π΄π₯0 + π΅π¦0 + πΆ − = 0 (11) Estimate the π and λ π₯π 2 + π¦π 2 + π΄π₯π + π΅π¦π + πΆ = 0 2 2 π₯0 + π¦0 + π΄π₯0 + π΅π¦0 + πΆ 1 − λ =0 (10) (11) • Obtain π₯0 , π¦0 of distorted center π – Extract three “straight line” from image , we can get π΄π , π΅π , πΆπ π=1,2,3 by circle fitting from (10) according to (11) , we have π΄1 − π΄2 π₯0 + π΅1 − π΅2 π¦0 + πΆ1 − πΆ2 = 0 π΄1 − π΄3 π₯0 + π΅1 − π΅3 π¦0 + πΆ1 − πΆ3 = 0 π΄2 − π΄3 π₯0 + π΅2 − π΅3 π¦0 + πΆ2 − πΆ3 = 0 (12) • Obtain the parameter of radial distorted λ – substitute π₯0 , π¦0 obtained from 12 to (11) 1 λ = π₯0 2 + π¦0 2 + π΄π₯0 + π΅π¦0 + πΆ (13) Sum up whole algorithm • Extract π(π ≥ 3) “straight line” ππ π = 1,2, β― , π from the image • Determine parameter π΄π , π΅π , πΆπ π=1,2,β―,π by fitting every “straight line” ππ with a circle according to (10) π₯π 2 + π¦π 2 + π΄π₯π + π΅π¦π + πΆ = 0 • Calculate the center π₯0 , π¦0 of the radial distortion according to (12) π΄1 − π΄2 π₯0 + π΅1 − π΅2 π¦0 + πΆ1 − πΆ2 = 0 π΄1 − π΄3 π₯0 + π΅1 − π΅3 π¦0 + πΆ1 − πΆ3 = 0 π΄2 − π΄3 π₯0 + π΅2 − π΅3 π¦0 + πΆ2 − πΆ3 = 0 • Compute the parameter λ of radial distortion according to (13). 1 λ = π₯0 2 + π¦0 2 + π΄π₯0 + π΅π¦0 + πΆ Circle fitting • It is a very important step to fit circle above algorithm. – data extracted from image are only short arcs, it is hard to reconstruct a circle from the incomplete data. Distorted “straight line” • Method Circle to fit Distorted center – Direct Least Squares Method of Circle Fitting (LS) – Levenberg-Marquardt Method of Circle Fitting (LM) Circle fitting - LS π₯π 2 + π¦π 2 + π΄π₯π + π΅π¦π + πΆ = 0 (10) • For each point π₯π , π¦π on the “straight line”, (10) gives π₯π , π¦π , 1 π΄ π΅ πΆ = − π₯π 2 + π¦π 2 (14) • Stacking equations from N points together gives M π΄ π΅ πΆ =b (15) Where M is N×3, b is N×1 matrix Circle fitting - LS • Directly using linear least squares fit method, we can get π΄, π΅, πΆ T T = M M −1 MT b (16) Circle fitting - LM Main ideas • Let the equation of a circle be π1 π₯ 2 + π¦ 2 + π2 π₯ + π3 π¦ + π4 = 0 Subject to the constraint : π2 2 + π3 2 − 4π1 π4 = 1 • (17) (18) The distance from a point π₯π , π¦π to the circle ππ = 2ππ 1+ 1+4π1 ππ Where ππ = π1 π₯π 2 + π¦π 2 + π2 π₯π + π3 π¦π + π4 (19) (20) Circle fitting - LM • From (18) π2 2 + π3 2 − 4π1 π4 = 1 , we can define an angular coordinate π by π2 = 1 + 4π1 π4 cos π, π3 = 1 + 4π1 π4 sin π (21) • Apply the standard Levenberg-Marquardt scheme to minimize the sum of squared distance β±= ππ 2 in the three dimensional parameter space π1 , π4 , π Further Discussion • In Algorithm1, we must have π(π ≥ 3) “straight lines”, we relax this constrain and discuss the conditions of – Only one straight line (L1) – Only two straight lines (L2) – Non-square pixels Only One Straight Line (L1) • Suppose the distortion center π is the image center and calculate the distortion parameter λ by (13) 1 λ = π₯0 2 + π¦0 2 + π΄π₯0 + π΅π¦0 + πΆ (13) Only Two Straight Lines (L2) • Extract “straight line” π1 γπ2 from the image; • Determine parameter π΄π , π΅π , πΆπ π=1,2 by fitting the “straight line” π1 γπ2 with a circle according to (10); π₯π 2 + π¦π 2 + π΄π₯π + π΅π¦π + πΆ = 0 (10) (12) become π΄1 − π΄2 π₯0 + π΅1 − π΅2 π¦0 + πΆ1 − πΆ2 = 0 (22) Only Two Straight Lines (L2) • Select a suitable interval πΌ πΌ = πΆπ₯ − 30, πΆπ₯ + 30 is suggested, for any π₯0 π ∈ πΌ, calculating π¦0 π according to (22); π΄1 − π΄2 π₯0 + π΅1 − π΅2 π¦0 + πΆ1 − πΆ2 = 0 π·π ∈ π« (22) π₯0 π → π¦0 π (πΆπ₯ , πΆπ¦ ) (πΆπ₯ − 30, πΆπ¦ ) π₯0 π , π¦0 π = ππ (πΆπ₯ + 30, πΆπ¦ ) Only Two Straight Lines (L2) • Calculate the distortion parameter λπ = π π (13), for any ππ = π₯0 , π¦0 ; 1 λ = π₯0 2 + π¦0 2 + π΄1 π₯0 + π΅1 π¦0 + πΆ 1 λ = π₯0 2 + π¦0 2 + π΄2 π₯0 + π΅2 π¦0 + πΆ (13) 1 2 λπ 1 + λπ 2 according to π₯0 π → π¦0 π π₯0 π , π¦0 π = ππ π·π ∈ π« (πΆπ₯ , πΆπ¦ ) (πΆπ₯ − 30, πΆπ¦ ) (πΆπ₯ + 30, πΆπ¦ ) λπ 1 λπ 2 1 1 λπ = λπ + λπ 2 2 Only Two Straight Lines (L2) • Calculate the corresponding corrected points π₯π’1 , π¦π’ 1 ( π₯π’ 2 , π¦π’ 2 ), for any λπ , ππ and all distorted points π₯π 1 , π¦π 1 ππ1 ( π₯π 2 , π¦π 2 ππ2 ) according to (4); π₯π’ = π₯π 1+λ ππ 2 π¦π 1+λ ππ 2 π₯π 2 + π¦π 2 , π¦π’ = where ππ 2 = (4) • Let [d, k] = minππ = min ππ 1 + ππ 2 , then obtain the optimal estimation ππ and λπ . ππ 1 π2 π1 ππ 2 Non-square Pixels • Let π₯0 , π¦0 : the coordinates of the distorted centre π πΌ : pixel aspect radio The distorted radius is given by ππ 2 = π₯π − π₯0 2 + πΌ 2 π¦π − π¦0 • From (8) we have 2 π₯π − π₯0 πΌ − πλ π₯π 2 + πΌ π¦π − π¦0 2 2 1 λ π + πλ π₯π − π₯0 π¦π − π¦0 + = 0 π + πΌ π¦π + − 2π₯0 πλ π +π₯0 2 + πΌ 2 π¦0 2 − π₯0 πλ 2 2 2 (23) πΌ π₯π + − − 2πΌ 2 π¦0 πλ πΌ 1 + π¦0 + = 0 πλ λ π¦π (24) Non-square Pixels π₯π 2 + πΌ 2 π¦π 2 + π − πλ +π₯0 2 + πΌ 2 π¦0 2 − πΌ − 2πΌ 2 π¦0 πλ πΌ 1 π¦0 + = 0 πλ λ 2π₯0 π₯π + − π π₯ πλ 0 + π¦π (24) • Equation (24) shows the graphics of distorted “straight line” is an ellipse under the condition of model (3). π πΌ • Similarly let A = πλ − 2π₯0 , π΅ = − − 2πΌ 2 π¦0 πλ πΆ = π₯0 2 + πΌ 2 π¦0 2 − π π₯ πλ 0 + πΌ π¦ πλ 0 π₯π 2 + πΌ 2 π¦π 2 + π΄π₯π + π΅π¦π + πΆ = 0 + 1 λ , we have (25) and 1 λ π₯0 2 + πΌ 2 π¦0 2 + π΄π₯0 + π΅π¦0 + πΆ − = 0 (26) Experiments and Results Experiments and Results Experiments and Results Experiments and Results Experiments and Results Experiments and Results Conclusions • Advantage – Neither information about the intrinsic camera parameters nor 3D-point correspondences are required. – based on single image and uses the distorted positions of collinear points. – Algorithm is simple, robust and non-iterative. • Disadvantage – It needs straight lines are available in the scene.