Full text
´ Indice de Contenidos A Comparison of omnidirectional and conventional monocular systems for visual SLAM 3 A.1 Introduction............................................ 3 A.2 The Spherical Camera Model projection . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 A.3 Simultaneous Localization and Mapping (SLAM) . . . . . . . . . . . . . . . . . . . . . . . 5 A.3.1 Thematchingprocess .................................. 6 A.3.2 The Spherical Camera Model for the EKF . . . . . . . . . . . . . . . . . . . . . . . 6 A.4 Experiments............................................ 7 A.4.1 Trajectoriescomparison ................................. 8 A.4.2 Influence of FOV in feature history . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 A.4.3 Reconstruction of the scene . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 A.4.4 Analysis of the vertical coordinate drift . . . . . . . . . . . . . . . . . . . . . . . . 11 A.5 Conclusion ............................................ 11 1
´ INDICE DE CONTENIDOS 2
Anexo A Comparison of omnidirectional and conventional monocular systems for visual SLAM Abstract-The SLAM (Simultaneous Localization and Mapping) problem is one of the essentials challenges for the current robotics. Our main objective in this work is to perform a comparison between a visual SLAM system using monocular omnidirectional and conventional vision. Our approach is based on the Extended Kalman Filter (EKF). We use the Spherical Camera Model to obtain geometric information from the images wich is valid for both types of cameras. To integrate this model in the EKF-based SLAM we linearize the direct and the inverse projections. The approach also uses the inverse depth parameterization of the measurements and SIFT points as measurement image points. We perform experiments with images of both systems corresponding to the same challenging trajectories. This experimentation confirms that the omnidirectional system gives a much better trajectory and orientation estimation than the conventional vision system. A.1 Introduction The use of omnidirectional systems in robotics applications has increased quickly in the recent years. The main reason for this rise is the wide Field Of View (FOV) of this kind of systems. There are many types of omnidirectional systems. The rotating camera is a conventional camera with a mechanic system that allows capturing images all around the scene. There are systems compound of many cameras that focus to different parts of the surrounding, all the images acquired by these cameras are joined together to build a panoramic image of the scene. Other omnidirectional systems are the dioptric systems that uses special lenses with wide FOV such as fish-eye lens. In robotics applications the most used omnidirectional system is the catadioptric one, composed by a curved mirror and a conventional camera. This type of system has been used in many applications such as surveillance [19], robot navigation [3] and localization [8], tele-presence [15] and 3D reconstruction [12]. In this work we use a hyper-catadioptric monocular system. An autonomous robot should be able to navigate through a previously unknown environment. The SLAM [21] problem tries to build a map of the surrounding and localize an autonomous robot relative to this map using only partial measurements of the environment. There exists several types of sensors to obtain information from the environment, e.g., radar, laser, sonar and vision. Among the visual SLAM approaches that use conventional vision we can find Davison et al. [5] where they present a real-time algorithm to recover 3D trajectory of a camera moving through an unknown scene. Pupilli and Calway [16] who describe a particle filtering SLAM extension which provides resilience to erratic motion. However just a few SLAM approaches use omnidirectional systems. Gaspar et al. [6] transform the omnidirectional images into bird’s eye images and propose two navigation modalities: Topological navigation and Visual Path following. Huang and Song propose in [9] a switching method of visual reference scans that can reduce the computation complexity of the Extended Kalman Filter. Kim and Chung [11] present a SLAM algorithm based on a vision sensor robust to the matching problem with 3
A.2. THE SPHERICAL CAMERA MODEL PROJECTION Figure A.1: Spherical Camera Model Projection cooperation of structure from motion and stereo vision. Miˇcuˇs´ık and Pajdla [14] present a method for fully automatic and robust estimation of two-view geometry, auto-calibration, and 3D metric reconstruction from point correspondences in images taken by cameras with wide circular field of view. When a vision system is used as measurement sensor a projection model is needed. Through this projection model we can obtain geometric information from the images. There are different projection models that describe central catadioptric systems [10, 20, 18, 22], however the most used is the Spherical Camera Model [7, 1]. This model can also be used with conventional cameras, which allow us to develop a single application for both types of cameras. So, in [17] we present the integration of the Spherical Camera model in a monocular SLAM application. The omnidirectional systems can capture in just one image the 360oof a scene. That makes possible to keep track of image points in all directions, while conventional systems only keeps track of image points inside a narrow FOV. We perform a comparison of omnidirectional and conventional cameras for SLAM. That comparison confirms the advantages of the omnidirectional systems over the conventional systems. The structure of this paper is the following. The Spherical Camera Model is described in Sec. A.2. The SLAM problem is presented in Sec. A.3 together with the Spherical Camera Model adaptation for the EKF. Finally the results of the comparison are presented in Sec. A.4, and conclusions are presented in Sec. A.5. A.2 The Spherical Camera Model projection First of all we present the projection model for the omnidirectional catadioptric systems. In [7] Geyer and Daniilidis present a unified model of projection for any catadioptric system with a single viewpoint. Barreto and Araujo extend this method in [1]. This model of projection is known as the Spherical Camera Model and it is widely used to model omnidirectional vision systems. The projection of a 3D point in the image is divided in three steps (see Fig. A.1). The world reference system coincides with the camera reference system. The first step is the projection of the scene point X onto the unit sphere centered in the origin O. There are two intersection points, x+and x−, but just one is physically true. These points are projected to a virtual projection plane πthrough the virtual projection center CP= (0,0,−ξ)T. The new point is x0. These two steps are coded in one equation: x0=~(X) = x y z+ξpx2+y2+z2 .(A.1) The next step transforms the virtual plane πin the image plane πIM through a homographic transformation HC. x00 =HCx0(A.2) 4
ANEXO A. COMPARISON OF OMNIDIRECTIONAL AND CONVENTIONAL MONOCULAR SYSTEMS FOR VISUAL SLAM HC=KCRMC(A.3) KC= fxsskew u0 0fyv0 0 0 1 (A.4) MC= ψ−ξ0 0 0ξ−ψ0 0 0 1 (A.5) where KCincludes the camera parameters, MCincludes the system parameters [1] and Ris the rotation matrix of the camera with respect to the mirror. Finally, the image coordinates are estimated by the next function: u=u v=fu(x00) = x00 z00 y00 z00 !(A.6) The parameter of the model, ξdepends only on the system modeled and the geometry of the mirror. For conventional cameras ξ= 0. ξ= 1 for catadioptric systems with parabolic mirror and orthographic camera, and 0 < ξ < 1 with hyperbolic mirror and perspective camera. With this model it is also possible to estimate the 3D ray from where the image point comes. That projection is named the inverse projection model. It starts with the point image coordinates u= (u, v)T, being x00 = (u, v, 1)T. The equations of the inverse projection model are x0=HC −1x00 (A.7) x=~(x0)−1= x0 y0 z0−ξ(x02+y02+z02) ξz0+χ (A.8) where χ=p(1 −ξ2)(x02+y02) + z02. Since the Spherical Camera Model deals with catadioptric systems and conventional cameras, our visual SLAM application can consider both vision systems just modifying the camera calibration parameters. A.3 Simultaneous Localization and Mapping (SLAM) An autonomous robot must be able to navigate through unknown environments. With SLAM techniques a robot can build a map of the environment and can keep track of its pose in this map using noisy measurements of the environment. In Visual SLAM these measurements are usually characteristic points in the images. The most used SLAM algorithms are based on the Kalman Filter, a filter that predicts the state of linear systems. As the geometry imposes non-linear relations, the Extended Kalman Filter (EKF) [21] is used. The EKF linearize the non-linear functions by approximating them to its first order Taylor series. The EKF is divided into two parts. In the first part, Prediction, the new state of the system is estimated from the previous time step state through the motion model. The second part of the algorithm, Update, uses the measurements of the environment to improve the new state prediction. Every state variable has a Gaussian distribution and it is represented by its mean and its covariance. The system state in our EKF algorithm is coded in x, x= ( r,q,V, ω |{z } Camera state , xi, yi, zi, θi, φi, ρi | {z } 3D points ...)T(A.9) where r(3×1) is the camera pose, q(4×1) is the quaternion of its orientation and V(3×1) and ω(3×1) are its linear and angular velocities, respectively. The scene points are coded by inverse depth parameterization [4], (xi, yi, zi) is the pose of the camera the first time it observes the point i,θiand φiare the angles that determine the corresponding 3D ray, and ρiis the inverse depth of the point. As correlation must be considered, if xhas ndimensions the state covariance matrix Cis a squared n×nmatrix. 5
A.3. SIMULTANEOUS LOCALIZATION AND MAPPING (SLAM) A.3.1 The matching process An essential step of the Update part of the EKF is the measurement matching. We use SIFT [13] points technique to detect and match image features. The SIFT descriptor is orientation and scale invariant, which adapts to multiview matching. The matching is made in two steps for each new image. First, we match these 3D points with the new image features. The matching only uses the 3D points which were predicted to be inside the FOV of the current image. An 3D point is matched to a new image feature if the distance between their descriptors multiplied by a threshold is not greater than the distance from the 3D point descriptor to all the other new image features descriptor. The value of this threshold is 1.5. In second step the matched point must be inside the 95% confidence region predicted by the SLAM algorithm to be considered valid. A.3.2 The Spherical Camera Model for the EKF The EKF algorithm requires the first derivative of the measurement equation. In order to adapt the Spherical Camera Model to the EKF algorithm we have formulated the model derivatives, for the direct and the inverse projection. •Jacobian of the Spherical Camera Model projection J=JfuHCJ~(A.10) Jfu= 1 z00 0−x00 z002 01 z00 −y00 z002!(A.11) J~= 1 0 0 0 1 0 ξx ρ ξy ρ1 + ξz ρ (A.12) where ρ=px2+y2+z2. To initialize new features we require a way to estimate the covariance of the new feature from the covariance of the image point. This estimation can be done through the Jacobian of the Spherical Camera Model inverse projection. •Jacobian of the Spherical Camera Model inverse projection ∂x ∂x00 =∂x ∂x0 ∂x0 ∂x00 (A.13) ∂x0 ∂x00 =HC −1(A.14) ∂x ∂x0= 1 0 0 0 1 0 ∂z ∂x0 ∂z ∂y0 ∂z ∂z0 (A.15) ∂z ∂x0=− 2ξx0(ξz0+χ)−(1−ξ2)ξx0ρ2 χ (ξz0+χ)2(A.16) ∂z ∂y0=− 2ξy0(ξz0+χ)−(1−ξ2)ξy0ρ2 χ (ξz0+χ)2(A.17) ∂z ∂z0=− 2ξz0(ξz0+χ)−(ξ+z0 χ)ξρ2 (ξz0+χ)2(A.18) where χ=p(1 −ξ2)(x02+y02) + z02and ρ2=x02+y02+z02. 6
ANEXO A. COMPARISON OF OMNIDIRECTIONAL AND CONVENTIONAL MONOCULAR SYSTEMS FOR VISUAL SLAM (a) (b) Figure A.2: Simulation of the projection of 3D points in a omnidirectional image. The black asterisks are the projection of the 3D central points, and the blue points are the projection of the cloud points around them. The red ellipses are the 95% confidence zone of the point according to the linearized model. Trajectory 1 Trajectory 2 Trajectory 3 Trajectory 4 Trajectory 5 Figure A.3: Selected trajectories To verify the developed Jacobians and to show the size and shape of the uncertainty in the omnidirectional images we perform the next simulation. We simulate central 3D points and a Gaussian cloud of 500 points around each of them. After that we project those points through the Spherical Camera Model in a omnidirectional image. Two cases are considered in Fig. A.2. In both cases two 3D points situated at the same distance from the camera are considered. In fig. A.2(a) the points have a 3D uncertainty, so the cloud of points form a sphere. In Fig. A.2(b) a 2D uncertainty in a horizontal plane perpendicular to the optical axis is considered, to simulate points extracted from the ground plane. In both cases the uncertainty near the center of the image is smaller than in the outer part of the image because of the non-homogeneous resolution of the omnidirectional image. In the case of the 2D uncertainty the width of the ellipse in the radial direction is smaller than in tangential direction, specially in the outer part of the image. A.4 Experiments The SLAM approach used to perform the comparison is based on a basic visual SLAM1using the EKF algorithm and codifying the measurements points by inverse depth parametrization [4]. We have added the Spherical Camera Model in the measurement equation and the SIFT features are used as image points. A bucketing is also used to allocate features all over the image. We use two image sequences provided by The Rawseeds Project2. They have been acquired by a robot with a hyper-catadioptric camera and a conventional one. The ground truth of the robot trajectory is given by an improved odometry. To better analyze the behavior of these two approaches we have split the whole trajectory in five partial trajectories (Fig. A.3) where some particular difficulties appeared. All of these trajectories have been acquired outdoor with natural lighting and include people and vehicles moving. The resolution of the images is 640x640 pixels for the omnidirectional camera and 320x240 pixels for the conventional one. The values of the angular resolution of both cameras (Fig. A.4) are 235.05 pixels rad 1HTTP://www.robots.ox.ac.uk/~SSS06/Website/P racticals/~SSS06.Prac2.MonocularSLAM.tar.gz 2HTTP://www.rawseeds.org 7
A.4. EXPERIMENTS Table A.1: Mean of the orientation error in radians for different values of the framerate, Trajectory 4 Framerate Omnidirectional Conventional camera camera 30 FPS −0.22 15 FPS 0.07 0.63 10 FPS 0.07 0.26 5 FPS 0.10 0.54 (a) (b) Figure A.4: Angular resolution of the cameras and 218.26 pixels rad for the conventional camera in horizontal and vertical direction respectively, and a mean of 232 pixels rad in tangential direction and 188.25 pixels rad in radial direction for the omnidirectional camera. We consider both vision sytems equivalent in angular resolution. The calibration parameters for both systems is provided by The Rawseeds Project. For the conventional camera we add the Spherical Camera Model parameter ξ= 0 to the original calibration. For the hyper-catadioptric system we have performed a new calibration [2] for better results. Initially we tested the effect of the framerate for both visual systems. An example of the estimated trajectories are shown in Fig. A.5 for the omnidirectional camera and for the conventional one. The Mean Absolute Error (MAE) of the orientation for each experiment is shown in Table A.1. The best results for both systems are the ones obtained with the maximum framerate. From now we use a framerate of 15 FPS for omnidirectional camera and 30 FPS for conventional camera in order to obtain the best results. A.4.1 Trajectories comparison Using monocular vision we cannot estimate the real scale of the 3D points. Therefore, we decide to use the orientation angle to compare the results since camera translation and 3D coordinates of points are affected by scale. The estimated results are compared to those given by the odometry. This scale problem has been solved in the literature using stereo vision or using additional sensors. In order to plot the real and the estimated trajectories in just one figure we compute a scale coefficient for each experiment. In Fig. A.6 we show the trajectory results and the orientation results for each tested trajectory. At first sight the results corresponding to the omnidirectional camera are better than the conventional camera results. Every estimated trajectory for the omnidirectional camera follows the real trajectory and takes all the turns. The estimation follows the real movement, but it does not fit the real dimension of the real trajectory. That is clear for the fifth section, Fig. A.6(e), where the omnidirectional estimated trajectory takes all the turns of the real trajectory, but the distances are not the same. The conventional camera estimation for this case does not follow the real trajectory, however the estimation of the orientation (Fig. A.6(e)) is similar to the omnidirectional one. For the third trajectory results (Fig. A.6(c)) the scale coefficient is not the same through the whole trajectory. The estimated trajectory with the omnidirectional camera goes up from the start point following the real trajectory, but after the 180oturn the estimation travels a shorter distance than the real trajectory. The scale coefficient has been computed for the upper point of the trajectory, and changes 8
ANEXO A. COMPARISON OF OMNIDIRECTIONAL AND CONVENTIONAL MONOCULAR SYSTEMS FOR VISUAL SLAM (a) (b) Figure A.5: Results of the framerate analysis of the trajectory 4 for the omnidirectional system, (a), and for the conventional system, (b). Trajectory 1 Trajectory 2 Trajectory 3 Trajectory 4 Trajectory 5 Figure A.6: The upper row shows the xy trajectory results of the experimentation and the lower row shows the orientation results for the five selected trajectories. The blue and red line are the estimated data with the omnidirectional camera and the conventional one, respectively. The black dashed line is the real data given by the odometry. after the turn. The values of the mean absolute error for the orientation in every trajectory are shown in the Table A.2. The omnidirectional camera gives much better orientation estimation than using conventional camera, even using double number of frames per second with the conventional camera. A.4.2 Influence of FOV in feature history To study the advantages of the FOV of the omnidirectional cameras over the conventional cameras we analyze the features history of the SLAM results. Fig. A.7 shows the features history over the time corresponding to the trajectory number 4. In this figure we can observe how the number of active features decreases significantly between the steps 600 and 800. The number of features removed from the state vector in this interval increases. Our SLAM approach removes features after 4 consecutive steps of not being matched. If we look at the omnidirectional camera feature history we observe that in the omnidirectional correspondent interval, 300 to 400 frame steps, the number of active features does not decrease. To better analyze what is happening here we study the particular images (Fig. A.8). In the conventional images we see how the camera approximates to an homogeneous wall that hides the further houses and trees. The visible floor and sky is also homogeneous. All the feature points are similar or not visible behind the wall, moreover the homogeneous scene makes hard to initialize new ones. The omnidirectional images do not suffer of this problem. Though it also gets closer to the wall it keeps track of features behind the robot. The bucketing is used to initialize features all over the image, avoiding the problem of having many features in a small area of the image. We test two bucketing alternatives for each vision system, a polar bucketing and a rectangular one. In Fig. A.9 we show the two bucketing alternatives tested for the omnidirectional and the conventional images. In Table A.3 we show the mean and the maximum value 9
´ INDICE DE FIGURAS 16
´ Indice de tablas A.1 Mean of the orientation error in radians for different values of the framerate, Trajectory 4 8 A.2 Mean of the orientation error in radians . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 A.3 Mean and maximum values of life of the features in seconds . . . . . . . . . . . . . . . . . 10 A.4 Mean of the absolute error of the estimation of the vertical coordinate zin meters . . . . 12 17
´ INDICE DE TABLAS 18
Bibliograf´ıa [1] Jo˜ao P. Barreto and Helder Araujo. Issues on the geometry of central catadioptric image formation. In IEEE International Conference on Computer Vision and Pattern Recognition, pages 422–427, 2001. [2] Y. Bastanlar, L. Puig, P. Sturm, J. J. Guerrero, and J. Barreto. Dlt-like calibration of central catadoptric cameras. In 8th OMNIVIS, held with ECCV, 2008. [3] J. S. Chahl and M. V. Srinivasan. A complete panoramic vision system, incorporating imaging, ranging, and three dimensional navigation. In IEEE Workshop on Omnidirectional Vision OMNIVIS, held with CVPR, pages 104–111, 2000. [4] Javier Civera, Andrew J. Davison, and J. M. M. Montiel. Inverse depth parametrization for monocular slam. IEEE Transactions on Robotics, 24(5):932–945, 2008. [5] Andrew J. Davison, Ian D. Reid, Nicholas D. Molton, and Olivier Stasse. Monoslam: Real-time single camera slam. IEEE Transactions on Pattern Analysis and Machine Intelligence, 26(6):1052–1067, 2007. [6] Jose Gaspar, Niall Winters, and Jose Santos-Victor. Vision-based navigation and environmental representations with an omnidirectional camera. IEEE Transactions on Robotics and Automation, 16:890–898, 2000. [7] Christopher Geyer and Konstantinos Daniilidis. A unifying theory for central panoramic systems and practical applications. In Proc. of the European Conference on Computer Vision, pages 445–461, June 2000. [8] J. J. Guerrero, A. C. Murillo, and C. Sag¨ues. Localization and matching using the planar trifocal tensor with bearing-only data. IEEE Transactions on Robotics, 24(2):494–501, 2008. [9] Fu-Sheng Huang and Kai-Tai Song. Vision slam using omni-directional visual scan matching. In International Conference on Intelligent Robots and Systems, 2008, pages 1588–1593, September 2008. [10] Sing Bing Kang. Catadioptric self-calibration. In Proc. of the IEEE Conference on Computer Vision and Pattern Recognition, volume 1, pages 201–207, 2000. [11] Jae-Hean Kim and Myung Jin Chung. Slam with omni-directional stereo vision sensor. In International Conference on Intelligent Robots and Systems, 2003, volume 1, pages 442–447, October 2003. [12] M. Lhuillier. Toward flexible 3d modeling using a catadioptric camera. In IEEE Conference on Computer Vision and Pattern Recognition, pages 1–8, 2007. [13] David G. Lowe. Distinctive image features from scale-invariant keypoints. International Journal of Computer Vision, 60(2):91–110, 2004. [14] B. Miˇcuˇs´ık and T. Pajdla. Structure from motion with wide circular field of view cameras. IEEE Transactions on Pattern Analysis and Machine Intelligence, 28(7):1135–1149, 2006. [15] Hajime Nagahara, Yasushi Yagi, and Masahiko Yachida. Super wide field of view head mounted display using catadioptrical optics. Presence: Teleoper. Virtual Environ., 15(5):588–598, 2006. 19
BIBLIOGRAF´ IA [16] M. Pupilli and A. Calway. Real-time visual slam with resilience to erratic motion. In IEEE Conference on Computer Vision and Pattern Recognition, volume 1, pages 1244–1249, June 2006. [17] Alejandro Rituerto, Luis Puig, and J. J. Guerrero. Visual slam with an omnidirectional camera. In 20th International Conference on Pattern Recognition, pages 348–351, 2010. [18] D. Scaramuzza, A. Martinelli, and R. Siegwart. A toolbox for easily calibrating omnidirectional cameras. In Proc. of the 2006 IEEE/RSJ International Conference on Intelligent Robots and Systems, pages 5695–5701, 2006. [19] G. Scotti, L. Marcenaro, C. Coelho, F. Selvaggi, and C. S. Regazzoni. Dual camera intelligent sensor for high definition 360 degrees surveillance. Vision, Image and Signal Processing, 152(2):250–257, 2005. [20] Tom´aˇs Svoboda and Tom´aˇs Pajdla. Epipolar geometry for central catadioptric cameras. International Journal of Computer Vision, 49(1):23–37, 2002. [21] Sebastian Thrun, Wolfram Burgard, and Dieter Fox. Probabilistic Robotics (Intelligent Robotics and Autonomous Agents). The MIT Press, 2005. [22] C. Toepfer and T. Ehlgen. A unifying omnidirectional camera model and its applications. In IEEE 11th International Conference on Computer Vision, pages 1–5, October 2007. 20