Full text
Uncertainty Analysis of the DLT-Lines Calibration Algorithm for Cameras with Radial Distortion Ricardo Galego1, Agustin Ortega2, Ricardo Ferreira1, Alexandre Bernardino1, Juan Andrade-Cetto2, Jos´ e Gaspar1 Abstract 3D metric data of environmental structures is nowadays present in many information sources (maps, GIS) and can be easily acquired with modern depth sensing technology (RGBD, laser). This wealth of information can be readily used for single view calibration of 2D cameras with radial distortion, provided that image structures can be matched with the 3D data. In this paper we present an analysis of the level of accuracy that can be obtained when such calibration is performed with the 2D-3D DLT-Lines algorithm. The analysis propagates uncertainty in the detection of features at the image level to camera pose, and from there to 3D reconstruction. The analytic error propagation expressions are derived using first order uncertainty models, and are validated with Monte Carlo simulations in a virtual indoor environment. The method is general and can be applied to other calibration methods, as long as explicit or implicit expressions can be derived for the transformation from image coordinates to 3D reconstruction. We present results with real data for two applications: i) the 3D reconstruction of an outdoors building for which 3D information is given by a map, observed by a mobile phone camera; and ii) the uncertainty in the localization at the floor plane of points observed by a robot equipped with an RGBD camera navigating in a typical indoor environment. Keywords: DLT-Lines, camera calibration, error propagation, uncertainty 1R. Galego, R. Ferreira, A. Bernardino and J. Gaspar are with the Institute for Systems and Robotics at Instituto Superior T´ ecnico, University of Lisbon, Portugal, {jag}@isr.ist.utl.pt. 2A. Ortega and J. Andrade-Cetto are with the Institut de Rob` otica i Inform` atica Industrial, CSIC-UPC, Barcelona, Spain, {cetto}@iri.upc.edu. Preprint submitted to Elsevier March 26, 2015
analysis 1. Introduction Camera calibration is required in a wide range of applications. Geo-localization of detected events, measurement of people’s height or vehicle’s speed, associating events between cameras, are examples of tasks which can only be tackled if cameras are calibrated with respect to the coordinate system of a known scenario. Whereas calibrating camera translation can, in many cases, be performed by a simple measurement, calibrating rotation and intrinsic parameters are more difficult tasks. In many cases the selection of the viewing direction, zoom and focus is only done while mounting the camera. Calibration in-situ is thus convenient for many applications. In-situ calibration with conventional calibration tools requires the use of calibration rigs or patterns which may be impractical in many cases. For instance the methods of Tsai [?], Heikkil¨ a [?], Zhang [?], Kannala [?] and Bouguet [?] demand that the known pattern covers most of the imaged area, which requires an impractically large calibration pattern if the camera is mounted at a high position, far from the floor level. In addition, conventional calibration methodologies are mostly focused in the intrinsic parameters, and thus do not provide distances (rigid pose transformations, extrinsic parameters) among the various units within a camera network. In other words, they are not designed to provide a global coordinate system for all cameras. In this work we consider a calibration methodology that instead of using a calibration pattern, uses the scene data imaged by a camera, mounted in place, and auxiliary data encoding some 3D structure about the imaged area (Fig. 1). In some cases the auxiliary data can be simply a map or an aerial image. Insitu calibration based on world data brings two benefits, (i) there is no need for calibration patterns, and (ii) the world data specifies a coordinate system which can be used by multiple cameras. The most common type of data used for camera calibration is the correspondence between 3D scene points and their 2D image projections [? ? ]. Considering pin-hole camera models, one finds that 3D points and their 2D projections are related by simple linear constraints in homogeneous coordinates that can be combined in the so-called Direct Linear Transformation (DLT) [? ? ]. Particularly in urban scenarios, straight lines are omnipresent. This motivates the use of lines for calibration. In fact, using lines instead of points is advantageous specially because simple image processing tools for local line fitting can be used to reduce the 2
(a) Indoors scenario (b) Outdoors scenario Figure 1: Indoors and outdoors camera calibration. (a) Calibration of a fixed camera using data acquired by an auxiliary mobile RGB-D camera. (b) Calibration of a fixed camera using the 3D structure of imaged buildings. The matching of 3D data (thick lines) with image data allows calibrating the fixed cameras {C}, and in particular estimating their poses WTC, and intrinsic parameters K. matching error between 2D and 3D structures. The identification of corresponding lines in multi-modal data is less sensitive to errors than establishing point correspondences [? ? ]. Interestingly, writing linear constraints for calibration from line correspondences, i.e. estimating the projection matrix, is as simple as with points [?]. Once the projection matrix is computed, the camera pose and intrinsic parameters are readily obtained by factorization [?]. The quality of the estimated parameters depends on a series of factors: structure of the observed environment, selected data matches, model parameterization and optimization criteria [?]. The ability to assess the uncertainty in the estimates of a calibration method is important not only to infer errors on 3D reconstruction but also as a means to validate and improve the calibration process. One way to do this is to propagate the uncertainty in the measurement process (variance in pixel coordinates of the feature points or lines used for calibration) to uncertainty values on the calibration parameters, either intrinsic, extrinsic, or both; and from these uncertainties, to that of the computed 3D reconstruction when such calibration values are used. This paper presents such detailed noise propagation analysis for the case of the DLT-Lines camera calibration process. We derive expressions to compute estimates for the the covariance of the camera intrinsic parameters as well as estimates for the covariance of the camera pose. To do so, we compute a first order linearization of the calibration method around the obtained solution and use it to 3
perform first order error propagation [? ? ]. We validate the obtained uncertainty with synthetic data based on Monte-Carlo simulations, and with real data from a non-overlapped camera network. The uncertainty analysis is derived first for the DLT-Lines formulation presented in [?] and further extended to introduce novel cases of interest, namely the combination of DLT-Lines with square pixel constraints, and with radial distortion. Finally, the analysis is also extended for the case in which the scene can be considered to obey a floor plane constraint, typical of aerial imagery. 2. Related work Cameras can be installed outdoors or indoors [? ? ], and can be used to cover overlapped or non-overlapped shared views [? ? ]. Overlapping fields of view usually allow matching scene features among different cameras and therefore provide extrinsic information for their calibration. Conversely, non-overlapped fields of view require alternative sources of extrinsic information. State of the art techniques for camera calibration require the use of nonplanar [?] or planar [?] patterns, usually made of points, lines or checkerborads [?], conics [?], or even ArTag markers [?]. Unfortunately, for large outdoor camera networks, calibration patterns of reasonable sizes often project on images with very small resolution, mainly because cameras are located at a considerable height with respect to the floor. In addition, a pattern-based independent calibration of each camera would require a secondary process to relate all camera coordinate systems to a global reference frame, but establishing this relation with small to null overlapping fields of view is nearly impossible. For planar scenarios, a DLT [? ? ? ] suffices to estimate image to plane homographies [?]. In practice however, the planar scenario assumption is too restrictive as nonparallel locally planar surfaces, such as ramps and plazas, often occur in real urban environments. An interesting in situ calibration methodology was proposed by Svoboda et al. [?]. This technique requires to use a bright moving spot to calibrate the camera network, simplifying the process with respect to the standard approaches. The technique assumes overlapping fields of view to estimate the epipolar geometry, to extract homographies, estimate depth, and finally compute the overall calibration of the camera network. However the method is not suited for outdoor scenarios or when the fields of view of the cameras do not overlap. Another alternative is to place the led light on a moving robot and to have a secondary robot equipped with a laser sensor track the first one, relating their position estimates to the camera network [?]. Yet another system that relies on tracking a moving object to 4
estimate the extrinsic parameters is [?], which assumes a constant velocity model for the target. Tracking a moving target each time the system needs recalibration might be prohibitive. The estimation of the camera location purely by analyzing cast shadows is also mathematically possible, but with very low position accuracy in practice [?], and if one is interested only in the topology of the network configuration and not in a metric calibration, multi-target tracking of people could also be an alternative [?]. In contrast to these approaches, we opt for a system that does not rely explicitly on a moving pattern or shadow to calibrate the network, and that produces accurate metric calibration, even in outdoor scenarios. Analogously to use moving targets, one may have moving cameras, e.g. cameras encompassing controlled orientation changes (pan and tilt). Agapito et al. [? ] use the properties of the image of the absolute conic to auto-calibrate such moving cameras. The computed intrinsic parameters, and the alignement of landmarks to image features allows to estimate also the extrinsic parameters [?]. However, camera networks are often composed of fixed cameras and therefore require scene information to compensate the lack of self-motion. Caprile and Torre [?] use the properties of vanishing points in two steps. First they estimate the focal length and the principal point of a camera, while in a second step they estimate the transformation between two cameras, with corresponding vanishing points. Another way to calibrate the camera network is to use a vertical vanishing point and the knowledge of a line in a plane orthogonal to the vertical direction on each camera image [?]. In [?] fundamental matrices are used to compute the relative camera positions. They utilize a vertical vanishing-point and an infinity homography. A common world coordinate system is defined to eliminate the overlapping constrain. Our work is in this vein of fixed cameras which are calibrated with information commonly available in urban scenarios. Our calibration scenarios consist of networks of fixed monocular cameras which are traversed by an auxiliary LIDAR or color-depth (RGB-D) mobile camera (see Fig. 1). The auxiliary camera provides 3D data of the scenario which is sufficient for the calibration and thus overcomes the need of additional calibration artifacts. In addition, the mobile camera is assumed to have an estimate of its own localization, and therefore provide a global (single) coordinate system to the fixed cameras. As there are many well known methodologies for self localizing the mobile camera, as e.g. Simultaneous Localization and Map Building (SLAM), we focus our work on the aspect of calibrating the fixed camera with respect to the mobile camera. Our recent work on camera calibration based in point clouds [?], is extended here with a more comprehensive Gauss-Newton formulation. This formulation allows the easy introduction of 5
additional constraints and algorithm analysis. An analysis of camera calibration uncertainty is needed to evaluate the quality of metric reconstructions that can be inferred from the images in the camera network [?]. In a wide variety of cases, uncertainty propagation can be analyzed using first order techniques [?]. In [?] for instance, a first order error analysis is used to propagate the calibration uncertainty to the motion parameters. Ansar and Daniilidis [?] study the sensitivity of the camera pose estimation while using points or lines with corresponding 3D coordinates. In Daniilidis and Ernst [? ] uncertainty propagation techniques are used to develop an unbiased estimator. Salvi et. al. [?] tested the accuracy of several classical calibrations methodologies. Sun and Cooperstock [?] show empirically the effects in camera camera calibration, of data size and input noise. In [?], the analysis is made via parameter correlation, and in [?] we introduce a calibration uncertainty analysis for cameras without radial distortion. In this paper we propose a first order estimation analysis of the full extrinsic calibration of cameras that have radial distortion. 3. Camera calibration The pin-hole camera model maps the 3D projective space to the 2D projective plane. Using homogeneous coordinates, a scene point, M= [X Y Z 1]Tis imaged as a point m= [u v 1]T, m. =P M =K[R t]M,(1) where . =denotes equal up to a scale factor and Pis a 3×4 projection matrix. The 3×3 upper triangular matrix Kcontains the intrinsic parameters. The rotation matrix Rand translation vector tform a rigid transformation from world to camera coordinates. In other words, tdenotes the location of the origin of the world frame in camera coordinates and Rdescribes the world frame also in camera coordinates. To model radial distortion, we use the division model, proposed by Fitzgibbon [?], where an undistorted image point, ˆmu= [uuvu]Tis computed from a radially distorted image point ˆmd= [udvd]Tby ˆmu=ˆmd/(1+λkˆmdk2), and λ represents the radial distortion parameter. The coordinates of ˆmuand ˆmdare expressed in a 2D coordinate system having the origin coincident with the image principal point ˆco= [cucv]T. The division model can also be conveniently written in homogeneous coordinates with uu vu 1 ˙= ud vd 1+λkˆmdk2 ⇔mu˙=md+λed.(2) 6
3.1. DLT-Points The Direct Linear Transformation (DLT), developed by Aziz and Karara [? ?], allows estimating the camera projection matrix in (1), P, by solving a linear system on the matrix entries using a set of 3D points, {Mi:Mi= [XiYiZi1]T} and their corresponding 2D image points {mi:mi= [uivi1]T}. Applying a cross product by mito both sides of the equation, mi×mi=mi×(P Mi), becomes zero in the left hand side and thus [mi]×P Mi=0, where [mi]×represents the linear cross product operation as a skew-symmetric matrix of mi. The properties of the Kronecker product [?], ⊗, allow one to obtain an equation factorizing the data and variables to estimate (MT i⊗[mi]×)vec(P) = 0,(3) where vec(P)denotes the vectorization of the matrix P, formed by stacking the columns into a single column vector. Each pair (Mi,mi)provides a set of three equations in the entries of vec(P) but only two of them are linearly independent. Therefore, one needs at least six pairs of 3D-to-2D corresponding points to estimate the projection matrix. Having N≥6 pairs of 3D-to-2D correspondences, in a nondegenerate configuration, allows forming a matrix A, 3N×12, by stacking Nmatrices MT i⊗[mi]×. The singular vector corresponding to the smallest singular value of Ais an estimate of projection matrix (vectorized), minimizing the error kA vec(P)k2s.t. kvec(P)k=1 [? ]. Note that pre-normalization of the input data is crucial on implementing this algorithm [?]. Hartley suggested that the appropriate pre-normalization method consists in translating all data points (3D and 2D points) so that their centroids are at the origin. Further the data should be scaled so that the average distance, of data points to the origin, is equal to √2 for image points and √3 for 3D points. Fitzgibbon’s division model provides an extension of the DLT-Points calibration methodology to deal with the estimation of the camera projection matrix, P, directly from radially distorted image data. Substituting the right hand side of (2), in the DLT-Points factorized equation (3) results in MT i⊗[mid +λeid]×vec(P) = 0 (4) which can be rewritten as (Ai1+λAi2)vec(P) = 0, where Ai1=MT i⊗[mid]×and Ai2=MT i⊗[eid]×. Considering Npairs (Mi,mi)one forms two 3N×12 matrices, A1and A2, by stacking matrices Ai1and Ai2. As suggested by Fitzgibbon [? ], left-multiplying the stacked matrices by AT 1results in a polynomial eigenvalue 7
problem (AT 1A1+λAT 1A2)vec(P) = 03. Its solution gives simultaneously the projection matrix, vec(P)and the radial distortion parameter, λ. Noting that the distortion model involves representing points around the principal point, which we assume to be approximately equal to the image center [?], the estimated projection matrix is finally obtained with P0=T−1P, where Tis a 3×3 matrix defining the translation of the image coordinate reference to the principal point. Having estimated P0, one has an estimate of the principal point, which can be used to iterate the calibration procedure and therefore improve the approximation. However, in some scenarios it is impossible to calibrate a camera using DLT- Points. An example is shown in Fig. 4 where we do not have direct 2D-3D correspondences between Fig. 4 (b) and (c). In such scenarios one can use DLT-Lines, as will be discussed in the next section. 3.2. DLT-Lines The use of lines for camera calibration, as opposed to isolated image points, allows for fine tuning the location of the lines in the image through simple line fitting algorithms. Given a 3D line Li, its projection on the camera image plane, lican be represented by an implicit equation, f(m) = amx+bmy+c=0, where mis a point on the line. The parameters of this equation, l= [a b c]T, can be defined by the cross product of two normalized points, m1and m2, l=m1×m2= m1y−m2y m2x−m1x m1xm2y−m1ym2x .(5) Note that aand bform a sub-vector that is perpendicular to the line, nl= [a b]T. The distance from point to line is d=lTm/knlk, and one can normalize the line distance with knlk=1. Camera calibration based in DLT-Lines involves matching image lines with 3D lines or, more precisely, 3D points. As in DLT-Points two cases are considered, namely (i) no radial distortion and (ii) significant radial distortion. In the case where the radial distortion is considered, it is modeled using Fitzgibbon’s division model. The case of radial distortion is detailed in the next section. First we detail the simpler case of no radial distortion. 3which can be solved in Matlab using the polyeig function 8
Any point mki lying on a line lisatisfies lT imki =0. Multiplying by lT ion both sides of (1), i.e., lT imki =lT iP Mki, leads to: lT iP Mki =0 (6) where Mki is a 3D point in projective coordinates lying in Lithe 3D line imaged as li. As in the case of DLT-Points, using the Kronecker product one obtains a form where the elements of the projection matrix are factorized: (MT ki ⊗lT i)vec(P) = 0.(7) Each pair of 3D point and its corresponding image line, (Mki,li), provides a single linear constraint in the entries of vec(P). In order to estimate Pone needs at least 12 pairs (Mki,li)4. Considering N≥12 pairs (Mki,li), one forms a matrix B,N×12, by stacking the Nmatrices MT ki ⊗lT i. The least squares solution p∗=arg pminkBpk2s.t. kpk=1,(8) where p=vec(P), is the right singular vector corresponding to the least singular value of B. From (7) one has that in a noiseless case Bp =0 with kpk6=0 and therefore max(rank(B)) = 11. As already discussed, to obtain the maximal rank in B requires at least twelve pairs (Mki,li). However, if one has some calibration parameters known a priori then the rank of Bmay be lesser than the maximum and the amount of required 3D information diminishes. Some more properties of interest can be stated for proposed calibration methodologies. From (7) and (3) it is possible to conclude that DLT-Points can be incorporated on DLT-Lines, by concatenation of matrices Aand B, respectively. Both matrices represent equations on entries of p, allowing two paired (Mi,mi)points, be combined with (Mki,li)to estimate the projection matrix P. Comparing both DLT methods, it is important to note that while in DLT-Points one has to provide one 3D-point to one 2D-point correspondences, in DLT-Lines one 2D-line, liis an image of a 3D-line, Liand thus associates many-3D-points to one-2D-line. Any point Mki ∈Liforms a linear constraint with li(7). This property of DLT-Lines allows to apply additional image processing tools that add 4Alternatively, one can state that nondegenerate six 3D lines configuration and their corresponding six image lines, i.e. six 4-tuples (Mi1,Mi2,mi1,mi2), are enough to estimate P. 9
(a) Multiple line orientations and a sample synthetic line image. (b) Noise added to end-points. (c) Fitting error vs initialization error. (d) Fitting error vs grouped initialization error. (e) Noise attenuation with line fitting (histograms). (f) Angular error vs line length. Figure 3: Line fitting Monte Carlo uncertainty analysis. (a) Range of line directions in the test set used for the Monte Carlo analysis. Sample input image built to represent one ground truth line (AB in red) from the test set. (b) Histogram of the normal output error, when a uniform noise is used as input. (c) Plot of the line fitting error according to initialization error. (d) Histogram of the line fitting error according to initialization error. (e) Example of the noise used in the initialization process, the noise was a uniform distribution. (f) Evolution of the angular error, arccos ˆnlTnl, estimation when is used different line lengths. 16
and sizes used. In the Monte Carlo simulation we initialized every line fitting with random uniform noise, between −4 and 4 pixels in each of the uand vdirections (see Fig. 3(b)). The blue dots in Fig. 3(c) show initialization and fitting errors. The initialization error (horizontal axis) is the distance from the initialization line end-points to the ground truth line, which has an approximately uniform distribution between 0 and 4√2 pixel, caused by the noise shown in Fig. 3(b). The fitting error (vertical axis) is the distance from the estimated line end-points to the ground truth line and has a less than 1 pixel mean error. The red line has unitary slope and thus indicates noise reduction or amplification for blue points under or over the red line. One observes that in general fitting reduces noise except when the initialization noise is already subpixel. Figure 3(d) is a box plot indicating median, 25th and 75th percentiles, which is obtained from (c) by splitting the horizontal axis in a number of regions. This plot shows that fitting error is approximately constant in the 75th percentiles of subpixel range, and therefore indicates an algorithm that upon convergence is independent on the initialization error. Figure 3(e) shows initialization and fitting errors as histograms. The initialization error has an approximately uniform distribution, while the fitting error has an histogram shifted to subpixel error as desired. Figure 3 (f) shows, as expected, that the angular distance (arccos ˆnlTnl) between the estimated line and the real line improves with the line width as shown in [? ? ]. 4.2. DLT-Lines error propagation without radial distortion This section explores the sensitivity of the process 2 , namely how error propagates from Σli,ΣMito ΣPwhen it is solved with a least squares (7). The optimization problem in (8) can be seen as function that accepts lines (li) and points (Mi) and outputs the least squares estimate of the projection matrix P: P=f(l1,...,lN,M1,...,MN).(22) To compute the covariance propagation we need the Jacobian of f, i.e. Jf. Although fdoes not have an explicit solution (it is the result of an optimization problem), an implicit system can be written from the KKT conditions of the constrained least squares problem in (8). G(l,M;p,γ) = (2B(l,M)p+2γp=0, pTp−1=0.(23) The implicit function theorem can then be used to provide 17
Jf=h−D{p,γ}G−1D{li,Mi}Gi12×6N where the brackets denote taking only the first 12 rows of the result since the last row is the row equivalent to the Lagrange multiplier γ. 4.3. Error propagation in the presence of radial distortion Suppose we have used sets ˆmand ˆ Mto estimate pusing the Gauss-Newton algorithm. Although p=f(l,e,M)does not have an explicit formulation again, we can use the implicit function theorem to compute the Jacobian of the method: Jf=h−D{p,σ,v}G−1D{l,e,M}Gi12×6N, where Gis the KKT system in (16), and whose derivatives are given in (18). Uncertainty can thus be propagated as Σp=JfΣl,e,MJT f(24) 4.4. Error propagation of P towards camera pose In [?] it is show how the projection matrix can be decomposed by the internal and external calibration parameters. Here we propagate the uncertainty from ΣP to ΣK,R,t,3 . We start by looking at (1), noticing that we can divide Pin two blocks, P3×3= KR and p4=Kt. Once again an explicit solution does not exist, however the separation of Pinto two blocks defines an implicit system if we take into account the upper triangular structure of Kand that Ris a rotation matrix: G(P,K,R,t) = P3×3=KR p4=Kt RTR=I K21 =0 K31 =0 K32 =0, The derivatives of this implicit system are: 18
JG= −I0I⊗K RT⊗I0 0−I0tT⊗I K 0 0 (I9+C3×3)(I⊗RT)0 0 0 0 1T 20 0 0 0 1T 30 0 0 0 1T 60 0 ,(25) where C3×3is a 9 ×9 circulant matrix (i.e., it’s the matrix that makes vec(RT) = C3×3vec(R)true for any 3×3 matrix R), and 1T iis a vector 9×1 of zeros with 1 in position i. Note that the constraints RTR=Iare redundant (symmetric), hence we manually remove the rows of JGcorresponding to the redundant equations. Once again we can use the implicit function theorem to find Jf=−[DK,R,TG]−1DPG. The estimation of ΣKRT can be obtained by: ΣK,R,T=JFΣPJT F.(26) These equations are valid for both calibration methodologies, with and without radial distortion. 4.5. Error propagation of P towards reconstructed floor points Propagating uncertainty from a camera point mto the world floor takes into account three sources of uncertainty: the camera point mitself, the camera position represented by the projection matrix Pand the mobile camera position represented by MTW. (19) provides an explicit equation but due to the inverse function involved, its derivatives are not trivial to compute. We do so in two steps, first interpreting (19) as an equality and then applying the normalization. The derivative of the equality with respect to m,P, and MTWis D=Q−mTQTEMTT W⊗Q−mTQ E ⊗Q P where, Q=PMTWET−1. After applying the projective normalization, the complete Jacobian of (19) is J=1/z0−x/z2 0 1/z−y/z2D where [x y z]Tis the projective result of (19). Again, the error propagation equation is Σx,y=JΣm,P,MTWJT.(27) 19
5. Experimental results In order to validate the proposed methods and uncertainty analysis we conduct some experiments in a virtual indoor environment, for which one has available precise and accurate ground truth. We show a simple real degenerate case which can be solved using DLT-Lines, with a single constrain. In addition, we apply the proposed uncertainty analysis to a real setup based on an indoor scene encompassing a wall and a couple of doors, which has been reconstructed in 3D using color-depth (RGB-D) data, thus providing directly the required 3D information for the DLT-Lines calibration methodology. 5.1. DLT-Lines calibration experiment In this first experiment we illustrate the DLT-Lines calibration methodology when available data does not fully constrain the solution (see sec. 3.3 (9)). The camera to calibrate is a cellphone camera using a single image of the streets and buildings from a window in the 5th floor of a tower (see Fig. 4(a)). The terrain is uneven and therefore the zero height was selected to be defined by the roof of the large building imaged in front of the camera. The 3D calibration information is only partially available as the 3D lines are pointed in a 2D aerial (orthophoto) view and therefore lack a depth coordinate, Z(see Fig. 4(b)). Vertical lines are defined by two points Z=0 and Z=1. Horizontal lines in the planar roofs of the building are also defined by choosing Z=0. Other horizontal lines, not at the roof height, have an unknown Z. Using only vertical and horizontal lines at the roof level, Z=0, results in rank deficient problem, more precisely, rank(B) = 10 in (7). The solution based on the two singular vectors corresponding to the least singular values, p=w11v11 + w12v12, has an ambiguity between the camera height and the vertical focal length. The null space is a set of camera configurations where the camera is fixed at X and Ycoordinates while Zvaries. As the Zgets higher the camera is rotated downwards and the vertical focal length is augmented so that the imaging does not change. In order to constrain the solution, we use the square pixels constraint proposed in the form of a 1D optimization problem in (9). The solution obtained, displayed graphically in Fig. 4(c), allows retrieving the camera pose (localization and rotation) and its intrinsic parameters. The estimated localization of the camera matches well the information of the aerial view (see in Fig. 4(b) the blue cross on the facade of the tower). 20
(a) Image taken by the camera to calibrate and image lines used for the calibration. (a) Image taken by the camera to calibrate and image lines used for the calibration. ine_cam_google2c-eps-converted-to.pdf (b) Aerial view (Google maps) and horizontal (blue) and vertical lines (red dots) used for calibration. (b) Aerial view (Google maps) and horizontal (blue) and vertical lines (red dots) used for calibration. (c) Estimated pose of the camera shown by the red pyramid. Estimated facade heights are used to define the ground plane. (c) Estimated pose of the camera shown by the red pyramid. Estimated facade heights are used to define the ground plane. Figure 4: Calibration and reconstruction experiment. Intrinsic and extrinsic calibration of a camera based on imaged lines (a) and 3D data inferred from an aerial image (b). The reconstruction of facade heights complements information not available in the aerial view (c). 21
In addition, the known scale of the aerial (orthophoto) image allows converting the 3D calibration data and the projection matrix into meter units. Consequently, it is possible also to infer in meter units some distances in the scenario, such as heights of buildings. The estimated height of the building observed in the middle of the image is 11.0 meters which can be compared with the height read in blueprints, 10.4 meters, yielding an experimental error of just 6% justified by data noise. 5.2. Synthetic experiments (a) Setup (b) Setup outside view (c) Noise in uv and XYZ (d) Noise in uv (e) Noise in XYZ Figure 5: Single camera setup. (a) Ground truth 3D information is known for the image lines shown. (c) Standard deviation of the estimation error of p11, entry (2,4)of P, given noise in uv and XY Z. (d) Standard deviation of calibration error propagated from noise in uv ranging from 0 to 6 pixel, red line; compared against Monte Carlo uncertainty analysis, blue line. (e) Standard deviation of calibration error propagated from noise in XYZ ranging 0 to 0.02 meters, red line; compared against Monte Carlo uncertainty, blue line. 4The decomposition of estimated projection matrix, detailed in [?], allows factorizing the intrinsic and extrinsic parameters as P=K[R t], and therefore comparing them with the ground truth. The horizontal focal length relative error is defined as Kerr = (K(1,1)−Ke(1,1))/K(1,1), where Kis the VRML camera true intrinsic parameters matrix, Keis the estimated one and K(3,3) = Ke(3,3) = 1. 22
(a) VRML setup (b) Camera to calibrate (c) RGBD camera, color image (d) RGBD camera, range image (e) 3D error 0 1 2 3 4 5 6 0 0.02 0.04 0.06 0.08 0.1 0.12 Std uv [pix] Standard deviation of ˆ P(i, j) (f) First order noise propagation 0 1 2 3 4 5 6 0 0.02 0.04 0.06 0.08 0.1 0.12 Std uv [pix] Standard deviation of ˆ PMC (i, j) (g) Monte Carlo simulation Figure 6: Analysis of calibration uncertainty in a two cameras setup. (a) VRML setup. (b) RGB image. (c) RGBD intensity image. (d) RGBD range image. Each line defined in the RGBD image corresponds to a line in the RGB image, and leads to a 3D line in the world/RGBD coordinate system. (e) 3D lines form the required input data for DLT-Lines calibration. (f) Relation between the error in the RGB image coordinates and the projection matrix parameters. (g) Monte Carlo simulations of the same relation between image error standard deviation and the standard deviation of the projection matrix elements. In this section the variance of the entries of the projection matrix, ΣP, predicted using the proposed uncertainty analysis is compared with a Monte Carlo based uncertainty analysis. The experiments are done using synthetic data (VRML ) which allows us to define with high accuracy a camera location and a set of fixed image points and the corresponding set of 3Dpoints. We consider various levels of white Gaussian noise in image points, 3Dpoints, or both. Experiments are conducted in three different scenarios in order to show that the proposed uncertainty propagation methodology effectively takes into account the structure of the scenario. The first setup is based on a single RGBD camera. The setup can be seen in Fig. 5(a), which corresponds to a typical ’L’ shaped corridor, the overal setup can be seen in Fig. 5(b). Camera calibration ground truth is known and is used to assess the validity of the noise propagation estimation method and the accuracy of the calibration. Figure 5(c) shows the theoretical value for σP(2,4)in the presence of noise simultaneously in both the image and the range values. The plot shows the correlated effects between the image and range noise values. 23
(a) VRML setup 2 (b) Camera to calibrate (c) RGBD Camera, color image (d) RGBD Camera, range image (e) 3D lines 0 0.5 1 1.5 2 2.5 3 3.5 4 0 0.005 0.01 0.015 0.02 0.025 0.03 0.035 Std uv [pix] Standar Deviation of ˆ Pi,j (f) Std P theoretical 0 0.5 1 1.5 2 2.5 3 3.5 4 0 0.005 0.01 0.015 0.02 0.025 0.03 0.035 Std uv [pix] Standar Deviation of ˆ Pi,j (g) Std P MC 0 0.5 1 1.5 2 2.5 3 3.5 4 0 0.002 0.004 0.006 0.008 0.01 0.012 0.014 Std uv [pix] Standar Deviation of λ (h) Std lambda Figure 7: Calibration uncertainty analysis for a camera with radial distortion. (a) VRML setup 2. (b) RGB image, with radial distortion. (c) RGBD intensity image. (d) RGBD range image. Each line defined in the RGBD image corresponds to a line in the RGB image, and leads to a 3D line in the world/RGBD coordinate system. (e) 3D lines form the required input data for DLT-Lines calibration with radial distortion. (f) Relation between the error in the RGB image coordinates and the projection matrix parameters in presence of radial distortion. (g) Monte Carlo simulations of the same relation between image error standard deviation and the standard deviation of the projection matrix elements. (h) Monte Carlo simulations and theoretical relation between image error standard deviation and the standard deviation of the radial distortion parameter. Monte Carlo simulations were also run for this setup. Plots (d) and (e) show both the analytic and estimated value of σfor P(2,4)as a function of variations in image and depth noise. Plot (d) shows once more that the first order approximation is only valid up to around σm=3 pixels. The theoretical prediction is nevertheless accurate for lower levels of noise showing that the proposed uncertainty analysis takes correctly into account the scene structure (li,Mi). Noise in range data exhibits less non-linear effects, as shown in plot (e). The second synthetic setup is formed by two cameras, namely a mobile colordepth (RGBD) camera which collects 3D data and a fixed RGB camera (Fig 6(a)), in this setup the cameras have different optical centers and orientations. Fig. 6(b) shows a synthetic image acquired by the RGB camera, while Figs. 6(c) and 6(d) show the synthetic intensity and range images aquired by the RGBD camera. In this setup, we analyze what happens when just the RGB image has noise. 24
In other words, the noise in 3D points is set null (σM=0)5. Uncertainty analysis was done using both the proposed propagation methodology and Monte Carlo simulations. Monte Carlo was configured to do 300 runs for each level of noise. The standard deviation of the noise in the 2D points varies from 0 to 6 pixels (σm=0 : .06 : 6 pixels). Having all the runs, the variance of every entry of P, i.e. ΣP(i j)for i=1..3 and j=1..4, has been estimated. The linear propagation of the standard deviation of each of the entries of P, computed with the proposed methodology, is shown in Fig. 6(e). As expected some entries of Pare more robust to noise than others. Figure 6(f) shows the Monte Carlo simulation results for each level of noise, again for all the entries of P. Plots (f) and (g) indicate that the analytical values obtained using the linear propagation analysis match those of Monte Carlo results for values of σmlower than approximately 3 pixels. Nonlinearities have more incidence for large image noise, making our first order approximation unreliable. Nonetheless, pixel value noises in ranges below 3 pixels are acceptable for most imaging sensors. The final synthetic experiment was done with two cameras, as the previews one, a fixed RGB camera and a mobile color-depth (RGBD) camera which collects 3D data. See Fig 7(a). However in this case the RGB camera has radial distortion, Fig 7(b). Figure 7(c) and 7(d) show respectively the RGBD intensity and 3Drange data. Figure 7(e) shows a set of 3Dlines given to the calibration algorithm, in red is the RGBD camera position and orientation, while in blue is the camera with radial distortion to calibrate. The proposed uncertainty analysis was once again compared to Monte Carlo simulations. In this case the standard deviation of noise in 2D varies from 0 to 4 pixels (σm=0 : .05 : 4 pixels). For each level of noise we did 400 runs. The theoretical prediction of ΣPis plotted in Fig. 7(f), while Fig. 7(g) shows the Monte Carlo results. We can observe that the theoretical results are in accordance with the Monte Carlo simulations. Figure 7(h) shows the theoretical and the Monte Carlo Σλ. Once again both results are similar empirically confirming the correctness of our approach. 5.3. Error propagation real dataset In this section we present the results of our algorithm in a real data set acquired in a typical indoor scene, with several doors and a corridor, see Fig. 8(b). This experiment was done with a ASUS X-Tion (RGBD camera) mounted in a mobile 5To improve readability, variance is written using upper case, Σ, and standard deviation is written using lower case, σ. 25