Bowling for Calibration: An Undemanding Camera Calibration Procedure Using a Sphere

Similar documents
Intelligent overhead sensor for sliding doors: a stereo based method for augmented efficiency

Stereo Image Rectification for Simple Panoramic Image Generation

Machine learning based automatic extrinsic calibration of an onboard monocular camera for driving assistance applications on smart mobile devices

Robotics - Projective Geometry and Camera model. Marcello Restelli

Free Space Detection on Highways using Time Correlation between Stabilized Sub-pixel precision IPM Images

Camera Calibration with a Simulated Three Dimensional Calibration Object

arxiv: v1 [cs.cv] 28 Sep 2018

Camera Calibration from the Quasi-affine Invariance of Two Parallel Circles

Recovering light directions and camera poses from a single sphere.

Flexible Calibration of a Portable Structured Light System through Surface Plane

Image Formation. Antonino Furnari. Image Processing Lab Dipartimento di Matematica e Informatica Università degli Studi di Catania

CIS 580, Machine Perception, Spring 2016 Homework 2 Due: :59AM

Hand-Eye Calibration from Image Derivatives

OBJECT detection in general has many applications

Vision Review: Image Formation. Course web page:

Improving Vision-Based Distance Measurements using Reference Objects

STEREO-VISION SYSTEM PERFORMANCE ANALYSIS

Camera Calibration for Video See-Through Head-Mounted Display. Abstract. 1.0 Introduction. Mike Bajura July 7, 1993

Contents. 1 Introduction Background Organization Features... 7

METRIC PLANE RECTIFICATION USING SYMMETRIC VANISHING POINTS

Camera model and multiple view geometry

Camera calibration with spheres: Linear approaches

3D Modeling using multiple images Exam January 2008

Vision-based Automated Vehicle Guidance: the experience of the ARGO vehicle

Self-calibration of a pair of stereo cameras in general position

COMPARATIVE STUDY OF DIFFERENT APPROACHES FOR EFFICIENT RECTIFICATION UNDER GENERAL MOTION

Simultaneous surface texture classification and illumination tilt angle prediction

Camera Parameters Estimation from Hand-labelled Sun Sositions in Image Sequences

Self-calibration of an On-Board Stereo-vision System for Driver Assistance Systems

Calibrating an Overhead Video Camera

Self-Calibration of a Stereo Vision System for Automotive Applications

DD2429 Computational Photography :00-19:00

Stereo Inverse Perspective Mapping: Theory and Applications

A COMPREHENSIVE SIMULATION SOFTWARE FOR TEACHING CAMERA CALIBRATION

Computer Vision. Coordinates. Prof. Flávio Cardeal DECOM / CEFET- MG.

A Survey of Light Source Detection Methods

CHAPTER 3. Single-view Geometry. 1. Consequences of Projection

Camera Model and Calibration

Segmentation and Tracking of Partial Planar Templates

COSC579: Scene Geometry. Jeremy Bolton, PhD Assistant Teaching Professor

A Stratified Approach for Camera Calibration Using Spheres

CSE 252B: Computer Vision II

Euclidean Reconstruction Independent on Camera Intrinsic Parameters

Multiple View Reconstruction of Calibrated Images using Singular Value Decomposition

Quasi-Euclidean Uncalibrated Epipolar Rectification

Projective geometry for Computer Vision

Horus: Object Orientation and Id without Additional Markers

Structure from motion

Computer Vision Project-1

Search Spaces I. Before we get started... ME/CS 132b Advanced Robotics: Navigation and Perception 4/05/2011

Geometric Hand-Eye Calibration for an Endoscopic Neurosurgery System

A General Expression of the Fundamental Matrix for Both Perspective and Affine Cameras

Camera Calibration With One-Dimensional Objects

A Robust Two Feature Points Based Depth Estimation Method 1)

An idea which can be used once is a trick. If it can be used more than once it becomes a method

CIS 580, Machine Perception, Spring 2015 Homework 1 Due: :59AM

Camera Calibration and Light Source Estimation from Images with Shadows

3D-2D Laser Range Finder calibration using a conic based geometry shape

Structure from motion

Robotics Programming Laboratory

STRUCTURAL ICP ALGORITHM FOR POSE ESTIMATION BASED ON LOCAL FEATURES

Practical Camera Auto-Calibration Based on Object Appearance and Motion for Traffic Scene Visual Surveillance

Unit 3 Multiple View Geometry

Short on camera geometry and camera calibration

Multiple View Geometry in Computer Vision Second Edition

Machine vision. Summary # 11: Stereo vision and epipolar geometry. u l = λx. v l = λy

Camera calibration with two arbitrary coaxial circles

Hartley - Zisserman reading club. Part I: Hartley and Zisserman Appendix 6: Part II: Zhengyou Zhang: Presented by Daniel Fontijne

Simultaneous Vanishing Point Detection and Camera Calibration from Single Images

Uncalibrated Video Compass for Mobile Robots from Paracatadioptric Line Images

Advanced Vision Guided Robotics. David Bruce Engineering Manager FANUC America Corporation

Camera Model and Calibration. Lecture-12

Stereo Vision-based Feature Extraction for Vehicle Detection

METR Robotics Tutorial 2 Week 2: Homogeneous Coordinates

Camera Calibration and Light Source Orientation Estimation from Images with Shadows

Time-to-Contact from Image Intensity

DRC A Multi-Camera System on PC-Cluster for Real-time 3-D Tracking. Viboon Sangveraphunsiri*, Kritsana Uttamang, and Pongsakon Pedpunsri

Two-view geometry Computer Vision Spring 2018, Lecture 10

Camera Registration in a 3D City Model. Min Ding CS294-6 Final Presentation Dec 13, 2006

Computer Vision I - Algorithms and Applications: Multi-View 3D reconstruction

Camera calibration. Robotic vision. Ville Kyrki

Stereo II CSE 576. Ali Farhadi. Several slides from Larry Zitnick and Steve Seitz

Visual Recognition: Image Formation

A Desktop 3D Scanner Exploiting Rotation and Visual Rectification of Laser Profiles

Agenda. Rotations. Camera models. Camera calibration. Homographies

Stereo Vision. MAN-522 Computer Vision

Epipolar Geometry in Stereo, Motion and Object Recognition

Visual Tracking of Planes with an Uncalibrated Central Catadioptric Camera

BIL Computer Vision Apr 16, 2014

Available online at Procedia Engineering 7 (2010) Procedia Engineering 00 (2010)

Mei Han Takeo Kanade. January Carnegie Mellon University. Pittsburgh, PA Abstract

calibrated coordinates Linear transformation pixel coordinates

3D Reconstruction from Scene Knowledge

How to Compute the Pose of an Object without a Direct View?

Early Fundamentals of Coordinate Changes and Rotation Matrices for 3D Computer Vision

Subpixel Corner Detection Using Spatial Moment 1)

A simple method for interactive 3D reconstruction and camera calibration from a single view

Structure from Motion

Partial Calibration and Mirror Shape Recovery for Non-Central Catadioptric Systems

Measurement and Precision Analysis of Exterior Orientation Element Based on Landmark Point Auxiliary Orientation

Transcription:

Bowling for Calibration: An Undemanding Camera Calibration Procedure Using a Sphere Pietro Cerri, Oscar Gerelli, and Dario Lodi Rizzini Dipartimento di Ingegneria dell Informazione Università degli Studi di Parma {cerri,gerelli,rizzini}@ce.unipr.it Abstract. Camera calibration is a critical problem in computer vision. This paper presents a new method for extrinsic parameters computation: images of a ball rolling on a flat plane in front of the camera are used to compute roll and pitch angles. The calibration is achieved by an iterative Inverse Perspective Mapping (IPM) process that uses an estimation on ball gradient invariant as a stop condition. The method is quick and as easy to use as throw a ball and is particularly suited to be used to quickly calibrate vision systems in unfriendly environments where a grid is not available. The algorithm correctness is demonstrated and its accuracy is computed using both computer generated and real images. 1 Introduction The recovery of 3D information from images is one of the main problems in computer vision, which needs the precise knowledge of both intrinsic and extrinsic parameters. While intrinsic parameters can be computed once for a given camera (with constant focal length), extrinsic parameters need a new measurement every time the camera is moved. For a camera mounted on a vehicle, the main problem is the computation of camera orientation whose drifts are mainly due to vibrations. Calibration is a critical and hard process which generally needs a large infrastructure such as a grid with markers at known positions. For example in the DARPA Grand Challenge project [1] (in which our team built a self-guided truck that completed the whole course using vision as primary sensor) we had the need to often recalibrate the cameras in the Mojave desert (Nevada). In such extreme environments a quick and easy calibration is mandatory. The use of a ball to calibrate is based on the assumption that a sphere has the same shape when framed from different points of view. The bowling ball is chosen because no deformations are possible, but any other ball can be used, assuming that deformations will be ignored. A number of images with the ball in different positions must be acquired for the calibration. These images are obtained throwing a ball on a flat plane, avoiding bounces. Intrinsic parameters of the camera and its position together with ball size must be known to apply this method. This kind of method can be used to compute pitch and roll angles; it was chosen not to use any other world reference, so it is impossible to estimate the yaw angle. The aim is to obtain a real time calibration system: this version of the algorithm

II is not working in real time yet but its development was studied in such a way that the transition to real time will be straightforward. Methods for recovering intrinsic and extrinsic camera parameters are usually classified into two categories. The first category includes self-calibration methods, which achieve calibration using multiple views of a static scene from a moving camera, eg. those described in [2] and [3]. The second approach exploits a calibration object. These methods can be further classified according to the information about the calibration object. Some methods assume to know the 3D position of a sufficient number of points (or equivalently the position of a known shape). To this category belongs the approach proposed by Tsai in [4], the DLT method firstly introduced by Abdel-Aziz et al. in [5] and the algorithm described in [6]. Other methods need only generic 3D geometry information, eg. coplanar points, as shown in [7]; a third category requires only the shape and the size of the calibration object. The proposed algorithm belongs to the last category and uses a ball as the calibration object, as also shown in [8]: the work by Agrawal needs a perfect contour recognition of a sphere filling a large part of image; this constraint is not required by the work described in this paper. The next section presents the algorithm details, section 3 shows some results obtained on both synthetic and real images, and finally in section 4 conclusions and future developments are presented. 2 Algorithm In this section a ball geometric invariant is deduced and applied in the calibration process to iteratively estimate pitch and roll angles of a camera orientation. Considering the rotation matrix with respect to pitch (θ) and roll (ρ), with no care about yaw (γ) angle 0 cρ sρ R = sθ sρcθ cρcθ (1) cθ sρsθ cρsθ where cρ, cθ, sρ and sθ stands for cos ρ, cos θ, sin ρ and sin θ respectively, and the translation vector T = [0 0 h] T, where h is the camera height from the ground, a mapping from 3D to 2D is performed. By applying the standard mathematical pin-hole model and an inverse perspective mapping (IPM) it is possible to establish a bijective mapping between ground plane points and image pixels. The calibration process produces R. IPM points (2D) are related to the 3D points by the following equation: k R T R X Y = X ipm Y ipm (2) Z h 0 h

III When R = R then a perfect calibration is achieved and R T R is an identity matrix; hence, we have X ipm = h X (3) h Z Y ipm = h Y (4) h Z Since camera intrinsic parameters are supposed to be known they are omitted in equation 2. O α A N β M C T Q B S V H Fig. 1. Ball section view from an observer O Considering spherical objects, just like the one depicted in figure 1, the following notations are assumed C = [x y r] T (5) d = x 2 + y 2 = HV (6) D = d 2 + (h r) 2 = OC (7) where r is the ball radius. Points A and B in figure 1 represent the points of interest: line AB delimits the ball area visible by an observer O. In order to simplify mathematical relationships handled in the following steps of the algorithm, line AB is approximated by the diameter of the observed spherical object, that is with line NS. In appendix A the correct expression of AB and the error caused by the approximation CNQ together with are estimated. A proportion between triangle OCM and the symmetry of N and S with respect to the ball center (C) allow to express segments CQ and QN as CQ = (h r) r D NQ = d r = r(h r) x2 + y 2 + (h r) 2 (8) D = r x2 + y 2 x2 + y 2 + (h r) 2 (9)

IV When the road plane matches the assumption of a flat area, the IPM transformation recovers the texture of the ground plane. When objects are present on the ground plane they appear stretched in the IPM image. The spherical shape of the ball when remapped via the IPM transformation is reshaped into a pseudo-ellipse as shown in figure 2. (a) (b) Fig. 2. IPM reshaping: (a) original image of a ball in 3D world (b) the ball after removal of the perspective effect. Now, applying equations 3 and 4, segments CQ and QN are used to compute the major axis of the pseudo-ellipse resulting from the IPM transformation. NS = 2 r h D 3 [(h r) 2 r 2 ]D 2 + r 2 (h r) 2 (10) Fig. 3. Estimation error computing It can be demonstrated that in perfect calibration scenarios NS is a geometric invariant with respect to θ and ρ.

V Equation 10 is not enough to compute the calibration parameters since it was deduced under the assumption of knowing the correct ρ and θ angles and distance D. Anyway it could be used to check the achievement of the correct calibration condition. In fact, as depicted in the block diagram of figure 3, a formal calibration check can be obtained by comparing the length of the major axis of the ellipse with the value given by equation 10. Distance evaluation is performed by using the coordinates of the ball center in the IPM image into equations 3-4, with Z = r, while ball detection may be obtained using the method described in [9] and approximating the ball shape in the IPM image with an ellipse. A critical phase of the algorithm is the update of estimated calibration parameters θ and ρ, used in the IPM process. This is done using a steepest-descent algorithm along quadratic error gradient. The isolines of the error function (see figure 4) are approximatively parallel lines even in the neighborhood of calibration point corresponding to the correct pitch and roll; so if it is simple to identify the line intersecting the calibration point (identified as calibration line in figure 4) by a descent gradient algorithm, it is more complex to move along this line to identify the calibration point, then the convergence toward the global minimum of the error function is hard. Matrices in equation 2, under a first order approximation, become R T R 1 0 θ 0 1 ρ (11) θ ρ 1 where θ = θ θ and ρ = ρ ρ. Isolines are identified by constant x 2 ipm + y2 ipm = d2 const; computing x ipm and y ipm by the equation 2 using the approximation 11, and excluding second order terms, the isoline equation becomes equal to 2x 0 z 0 H θ = 2y 0 z 0 H ρ (h 2 (x 2 0 + y 2 0) d 2 z 2 0) (12) where H = h 2 + d 2 and (x 0, y 0, z 0 ) T is the real world position of the ball center. Notice that equation 12 represents a line in ρ-θ plane with slope y 0 /x 0. Following the orthogonal vector (y 0, x 0 ) T the line passing through the calibration point can be identified. By iteratively executing the steps described in algorithm 3, using images of ball in different positions, many lines with different slope are found. All lines intersect in a single point in ρ-θ plane: this is the calibration point. In order to find the intersection point the ρ-θ plane is partitioned in accumulator cells; the calibration point is located in the cell accumulating the maximum value. An outline of the algorithm is shown below: 3 Results The algorithm has been tested both with synthetic and real images (see figure 5).

VI 3 2.5 Absolute Error on Measured Major Axis Theoric Major Axis major axis difference approximated gradient numerical gradient calibration line calibration point 2 Pitch θ ( ) 1.5 1 0.5 0 2 1.5 1 0.5 0 0.5 1 1.5 2 Roll ρ ( ) Fig. 4. Isolines of calibration error with gradients. The calibration point is indicated with a red circle. Algorithm 1 Calibration algorithm Require: ρ 0, θ0, ball image 1: compute error and estimate ball position (x c, y c) like in figure 3, using ρ k and θk ; 2: update ( ρ k+1, θk+1 ) incrementing of a step η error in direction of ( y c, x c) sign(error); 3: stop when error sign changes and trace line on cell accumulator plane; increment k otherwise. The mathematical correctness was tested with synthetic images. In this scenario a set of rolling ball images are created assuming to use a camera with known intrinsic and extrinsic parameters; then the images are processed by the algorithm and a comparison between output results and expected parameters values is done. Statistical data reported in figure 6 confirm that the underlying idea is correct and that the algorithm can achieve a fine grade of precision: due to the algorithm structure the maximum error is the estimation of the ρ angle. Mean error on θ prediction is about 0.57 while on ρ is about 1.26 using square accumulator cells of 0.5 per side.

VII Fig. 5. Top row: images of a ball on a flat surface; Bottom row: images of a real sequence acquired on the usual calibration grid that was used as a reference to assess the precision of this method. 70 Absolute Error Distribution on Pitch Percentage 60 50 40 30 20 10 0 1 0 1 2 3 4 5 6 Error on θ ( ) 30 Absolute Error Distribution on Roll Percentage 25 20 15 10 5 0 1 0 1 2 3 4 5 6 Error on ρ ( ) Fig. 6. Statistic of calibration error with artificial images Tests on sequences of real images acquired by a monocular vision system show high sensitivity of calibration variables prediction on the accuracy of experimental setup parameters. As reported in figure 7 a small error in measuring camera height from the ground plane can determine a significant error, especially on real image analysis. The analysis of the error computed on real images determines a value of h for which the error is zero. This value of h represents the correct height estimation. This shows that an error of about 2% in measuring an algorithm input variable can cause significantly different prediction error.

VIII 14 12 Error on ρ varying camera height real sequence measured camera height deduced camera height 10 Error (degree) 8 6 4 2 0 1.54 1.56 1.58 1.6 1.62 1.64 1.66 1.68 1.7 1.72 Height (m) Fig. 7. Error on roll prediction at different camera height 4 Conclusions The proposed algorithm has been proved to work correctly: its precision (computed on synthetic images) is about 0.5 for the pitch angle and 1.2 for the roll one as shown in section 3. It is experimentally demonstrated that 10 images are enough to obtain a satisfactory calibration in standard conditions; a greater number of images may not provide more precise results. The required number of images depends anyway on the ball position, and therefore on the slope of calibration lines obtained in different processing. Unfortunately the result is sensibly influenced by errors in measurement of input parameters that are considered as known (e.g. camera height, ball sizes, camera intrinsic parameters). Moreover uncorrect ball shape detection may cause low precision results too: in unstructured environments, such as when no clear contrast between the calibration object and the background is present, precision may be reduced. Other weaknesses can be attributed to the stop condition of the iterative process: due to the presence of local minima the algorithm could identify a wrong calibration line. Moreover the assumption that the correct calibration point stands in the accumulator cell with maximum value stored is not always true: other heuristics, that use accumulator cells or other methods, are required to overcome limitations on the computation of the lines intersection. The current implementation is not real time: for each processed image the algorithm needs to compute a number of IPM transformations, that are computationally slow; the choice of the images to be used is currently made by the user and the user can also help the ball detection by identifying at least three points on the ball edge. This method can be very easily extended to stereo vision system: once the pitch and roll angles are computed for both cameras, the relative yaw between the two cameras can be computed using only two pairs of synchronized images.

IX A Appendix: Approximation of Pseudo-ellipse Major axis The inverse perspective mapping of line N S provides a good approximation of the real major axis AB (see figure 1). In this section the exact formula of AB is deduced and compared with our approximation. The position of end points A and B with respect to the ball center is easily achieved, when the measure of segments CT and AT is known (T is the projection of A on line MC). The value of angle CAT ˆ is equal to the difference of angles β and α (figure 1): α = arcsin r D, β = arcsin h r D (13) Thus the relative position of point A (and its symmetric B) is achieved by projecting radius AC on segments CT = r ( D 2 r 2 (h r) d r ) D 2 (14) AT = r ( r (h r) + d D 2 r 2) D 2 (15) Under the assumption of flat area, IPM transformation given by equations 3 and 4 maps points A and B expressed in 3D world coordinates into pseudo-ellipse extreme points. Finally the resulting length of major axis of pseudo-ellipse is computed: 2 h r D 4 v ( t 2 d 2) AB = t 2 (D 4 r 4 ) d 2 r 2 v 2 2 r 3 (16) t d v where t = (h r) and v = D 2 r 2. Fig. 8. Relative error due to the approximation of pseudo-ellipse axis AB with NS with respect to the distance camera pinhole-ball center d (camera height h = 1.5 m, ball radius r = 0.3 m).

X Note that the equation 16 is more complex and less suitable for algebraic manipulation than the approximation 10 used in this paper. Figure 8 shows a comparison of the two estimations of pseudo-ellipse axis with respect to the ground distance of the ball center from the camera pinhole. The approximation error grows as the distance D between the camera and the ball decrease; however, even in the worst case, the error committed using NS instead of AB is negligible: the maximum relative error is equal to 3 %. References 1. DARPA: http://www.grandchallenge.org/ (2005) 2. Hartley, R.I.: An algorithm for self calibration from several views. Proc. IEEE Conference on Computer Vision and Patter Recognition 1(7) (June 1994) 908 912 3. Hartley, R.I.: Euclidean Reconstruction from Uncalibrated Views. In: Applications of Invariance in Computer Vision. (1993) 237 256 4. Tsai, R.Y.: A Versatile Camera Calibration Technique for High-Accuracy 3D Machine Vision Metrology Using Off-the-Shelf TV Cameras and Lenses. IEEE Journal of Robotics And Automation RA-3 (aug 1987) 323 344 5. Abdel-Aziz, Y., Karara, H.: Direct linear transformation from comparator coordinates into object space coordinates in close-range photogrammetry. Proceedings of the Symposium on Close-Range Photogrammetry (1971) 1 18 6. Bouguet, J., Perona, P.: Camera Calibration from Points and Lines in Dual-Space Geometry. Proc. 5th European Conf. on Computer Vision 2 6 7. Zhang, Z.: A Flexible New Technique for Camera Calibration. IEEE Transactions on Pattern Analysis and Machine Intelligence 22 (2000) 1330 1334 8. Agrawal, M., Davis, L.S.: Complete camera calibration using spheres: A dual-space approach. In: Procs. IEEE Intl. Conf. on Robotics and Automation. Volume 2., Albuquerque,NM (oct 2003) 782 789 9. Fitzgibbon, A., Pilu, M., Fisher, R.B.: Direct Least Square Fitting of Ellipses. IEEE Transactions on Pattern Analysis and Machine Intelligence 21 (may 1999) 476 480