THE image based localization problem as considered in

Similar documents
Generalized RANSAC framework for relaxed correspondence problems

Nonparametric estimation of multiple structures with outliers

Nonparametric estimation of multiple structures with outliers

Stereo and Epipolar geometry

Hierarchical Building Recognition

arxiv: v1 [cs.cv] 28 Sep 2018

Instance-level recognition part 2

Instance-level recognition

Instance-level recognition II.

Object Recognition with Invariant Features

3D model search and pose estimation from single images using VIP features

Feature Based Registration - Image Alignment

Instance-level recognition

Determinant of homography-matrix-based multiple-object recognition

The SIFT (Scale Invariant Feature

Segmentation and Tracking of Partial Planar Templates

Viewpoint Invariant Features from Single Images Using 3D Geometry

arxiv: v1 [cs.cv] 28 Sep 2018

Local invariant features

RANSAC: RANdom Sampling And Consensus

Image correspondences and structure from motion

Specular 3D Object Tracking by View Generative Learning

Motion Estimation and Optical Flow Tracking

RANSAC and some HOUGH transform

Local features: detection and description May 12 th, 2015

CSE 252B: Computer Vision II

Structured Light II. Thanks to Ronen Gvili, Szymon Rusinkiewicz and Maks Ovsjanikov

Combining Appearance and Topology for Wide

Invariant Features from Interest Point Groups

Image Features: Local Descriptors. Sanja Fidler CSC420: Intro to Image Understanding 1/ 58

An Image-Based System for Urban Navigation

SIFT: SCALE INVARIANT FEATURE TRANSFORM SURF: SPEEDED UP ROBUST FEATURES BASHAR ALSADIK EOS DEPT. TOPMAP M13 3D GEOINFORMATION FROM IMAGES 2014

A Summary of Projective Geometry

Local Features: Detection, Description & Matching

SUMMARY: DISTINCTIVE IMAGE FEATURES FROM SCALE- INVARIANT KEYPOINTS

Video Google: A Text Retrieval Approach to Object Matching in Videos

Fast Outlier Rejection by Using Parallax-Based Rigidity Constraint for Epipolar Geometry Estimation

A NEW FEATURE BASED IMAGE REGISTRATION ALGORITHM INTRODUCTION

Local features: detection and description. Local invariant features

Midterm Wed. Local features: detection and description. Today. Last time. Local features: main components. Goal: interest operator repeatability

Homographies and RANSAC

III. VERVIEW OF THE METHODS

Evaluation and comparison of interest points/regions

COMPARATIVE STUDY OF DIFFERENT APPROACHES FOR EFFICIENT RECTIFICATION UNDER GENERAL MOTION

3D Computer Vision. Structured Light II. Prof. Didier Stricker. Kaiserlautern University.

Local features and image matching. Prof. Xin Yang HUST

Perception IV: Place Recognition, Line Extraction

A Comparison of SIFT, PCA-SIFT and SURF

Motion Tracking and Event Understanding in Video Sequences

RANSAC RANdom SAmple Consensus

CS 231A Computer Vision (Winter 2014) Problem Set 3

Global localization from a single feature correspondence

COSC160: Detection and Classification. Jeremy Bolton, PhD Assistant Teaching Professor

A Framework for Multiple Radar and Multiple 2D/3D Camera Fusion

Feature Detection. Raul Queiroz Feitosa. 3/30/2017 Feature Detection 1

Structure Guided Salient Region Detector

Building a Panorama. Matching features. Matching with Features. How do we build a panorama? Computational Photography, 6.882

Key properties of local features

Construction of Precise Local Affine Frames

CS 664 Image Matching and Robust Fitting. Daniel Huttenlocher

Robust Geometry Estimation from two Images

Automatic Image Alignment

Factorization with Missing and Noisy Data

From Structure-from-Motion Point Clouds to Fast Location Recognition

CS 4495 Computer Vision A. Bobick. CS 4495 Computer Vision. Features 2 SIFT descriptor. Aaron Bobick School of Interactive Computing

Part-Based Skew Estimation for Mathematical Expressions

Bundling Features for Large Scale Partial-Duplicate Web Image Search

Shape recognition with edge-based features

CEE598 - Visual Sensing for Civil Infrastructure Eng. & Mgmt.

Visual Recognition and Search April 18, 2008 Joo Hyun Kim

Automatic Image Alignment (feature-based)

Automatic estimation of the inlier threshold in robust multiple structures fitting.

A Novel Algorithm for Color Image matching using Wavelet-SIFT

EE795: Computer Vision and Intelligent Systems

Patch-based Object Recognition. Basic Idea

Topological Mapping. Discrete Bayes Filter

Training-Free, Generic Object Detection Using Locally Adaptive Regression Kernels

Methods for Representing and Recognizing 3D objects

CS 231A Computer Vision (Winter 2018) Problem Set 3

Image Feature Evaluation for Contents-based Image Retrieval

Motion illusion, rotating snakes

CSCI 5980/8980: Assignment #4. Fundamental Matrix

Computational Optical Imaging - Optique Numerique. -- Multiple View Geometry and Stereo --

Reinforcement Matching Using Region Context

Simultaneous Recognition and Homography Extraction of Local Patches with a Simple Linear Classifier

Automatic Image Alignment

Local Features Tutorial: Nov. 8, 04

Introduction. Introduction. Related Research. SIFT method. SIFT method. Distinctive Image Features from Scale-Invariant. Scale.

Image-based Modeling and Rendering: 8. Image Transformation and Panorama

Local Image Features

URBAN STRUCTURE ESTIMATION USING PARALLEL AND ORTHOGONAL LINES

Efficient Computation of Vanishing Points

Feature Matching and Robust Fitting

Stereo Vision. MAN-522 Computer Vision

CS 231A Computer Vision (Fall 2012) Problem Set 3

CS231A Midterm Review. Friday 5/6/2016

Vision par ordinateur

10/03/11. Model Fitting. Computer Vision CS 143, Brown. James Hays. Slides from Silvio Savarese, Svetlana Lazebnik, and Derek Hoiem

Region matching for omnidirectional images using virtual camera planes

Computer Vision for HCI. Topics of This Lecture

Transcription:

JOURNAL OF L A TEX CLASS FILES, VOL. 6, NO. 1, JANUARY 2007 1 Image Based Localization Wei Zhang, Member, IEEE, and Jana Košecká Member, IEEE, Abstract In this paper we present an approach for image based localization in urban environments. Given a database of views of city street views tagged by GPS locations, the system computes the GPS location of a novel query view. We first use a wide-baseline matching technique based on SIFT features to select the closest views in the database. Often due to a large change of viewpoint and presence of repetitive structures, a large percentage of matches (> 50%) are not correct correspondences. The subsequent motion estimation between the query view and the reference view, is then handled by a novel and efficient robust estimation technique capable of dealing with large percentage of outliers. We will discuss in detail sensitivity and robustness of the proposed robust estimation method. The motion estimation stage is also accompanied by a model selection step among the fundamental matrix and the homography. Once the motion between the closest reference views is estimated, the location of the query view is then obtained by triangulation of translation directions. The presented system is tested on a moderate size dataset of street views and results are shown to have higher accuracy than previous reported results. Performance and scalability of the presented system will be also discussed. Index Terms Image Based Localization, Matching, Robust Estimation I. INTRODUCTION THE image based localization problem as considered in this application is comprised of three phases: location recognition, camera motion estimation between the query view and the closest reference views and final position triangulation. Thanks to recent advances in the areas of object recognition, wide baseline matching and structure and motion recovery, a variety of the techniques are currently available to tackle the individual subproblems. In order to integrate the individual components to the system and make it work in realistic setting, several challenges needs to addressed. One most notable challenge is related to the issue of obtaining reliable matches and subsequent correspondences between the query view and the reference views. For localization the accurate correspondences are necessary for computation of the camera pose. In order to obtain reliable correspondences, we describe a modified wide-baseline matching scheme, which yields larger number of matches. The initial matching is then followed by a novel and efficient robust motion estimation technique capable with dealing with large number of outliers [1]. Integration of these two stages is crucial for obtaining accurate and repeatable results in difficult urban environments. a) Overview: The database of location views tagged with GPS data is initially acquired during the exploration of the environment. For the purpose of location recognition and widebaseline matching we choose to represent each view by a set of SIFT keypoints. Given a new query view, the location Department of Computer Science, George Mason University, Fairfax, VA 22030, {wzhang2,kosecka}@cs.gmu.edu recognition phase, described in Section III, is accomplished by a voting scheme. Section IV describes briefly a novel robust estimation technique used to identify correct matches and estimate motions between the query view and reference views. Two reference views are then selected for the final GPS location triangulation. Individual steps of the approach are described in the following sections. II. RELATED WORK In the context of similar applications, the problem of location and building recognition has been addressed by several authors in the past. In [2] authors used vertical vanishing direction for alignment of a building view in the query image to the canonical view in the database and proposed matching using point features followed by the relative pose recovery between the views. The alignment step relied on the presence of dominant plane and hence was applicable to scenarios with dominant building facades. The actual triangulation using known GPS locations was not carried out. Authors in [3] focused mostly on the recognition aspects using local affine invariant regions and a set of color moment invariants to represent them. Recognition was based on the number of matched regions. In [4] the recognition was achieved by matching line segments and their associated descriptors. False matches were rejected by imposing epipolar geometry constraint. The relative pose was recovered using planar motion assumption between the views. Alternatively when dealing with large databases, it is desirable to use a global descriptor, to preselect small a number of candidates before carrying out recognition based on local features. For this stage color histograms were used, because of their simplicity and robustness to changes in object s scale, orientation and to some extent viewpoint. In [5] the authors described an approach to recognizing location from mobile devices using image-based Web search utilizing a hybrid color histogram and keyword search technique. However global color histograms are not very discriminative since images with similar color distributions but different content are often present. Recently in [6] authors studies related problem and focused on the issues of scalability and efficient retrieval using hierarchical quantization of the feature space. In the presented approach we focus more on the final motion estimation stage, while the first stage of our approach can be replaced by more efficient search for most promising candidate locations. III. LOCATION RECOGNITION The goal of the location recognition stage is to find the closest views from the model database to the given query view. We address this stage by means of wide-baseline matching techniques using local scale invariant features and their

JOURNAL OF L A TEX CLASS FILES, VOL. 6, NO. 1, JANUARY 2007 2 associated descriptors, followed by a voting stage. There are several representatives of local image features [7], [8], [9], [10] which have been shown to be robust with respect to changes in scale and/or affine transformations. In our work we use the SIFT features proposed by D. Lowe [7], which achieved best performance in the matching context based on comparison tests reported by Mikolajczyk and Schmid [11]. A. Matching SIFT keypoints The SIFT keypoints correspond to highly distinguishable image locations which can be detected efficiently and have been shown to be stable across wide variations of viewpoint and scale. Keypoints are detected by searching for peaks in the image D(x, y, σ) which is obtained by taking a difference of two neighboring images in the scale space. Each detected keypoint has an 128 dimensional descriptor f associated with it, which characterizes the gradient distribution of the local image patch. Figure 1 shows examples of detected SIFT keypoints. For each model image, the keypoints are extracted off line and saved in the database. After extracting keypoints from a query image, its descriptors are matched to those of the database views. descriptors f and g is above some threshold τ c : cos(f, g) = f T g f 2 g 2 > τ c. (2) τ c is set to be 0.97 in our experiments. The threshold is rather high to assure the outlier ratio would not increase, while more inliers are found. The fact that more correspondences are available makes the recognition more stable and motion estimation more accurate. This empirical value was based on the study of ROC curve associated with the threshold. The ROC curve was obtained using another database, but the threshold is general enough to ensure good performance in a variety of setttings. In case multiple features pass τ c (this happens because of repetitive structures), only the one with the highest cosine value is kept. B. Coarse location recognition by voting The closest reference views in the database are chosen by a simple voting scheme. The reference views with the largest number of matches with the query view will be selected. The locations of those reference views are likely to be close to the locations of the query view. In our experiments, top 5 views are retained. The best candidates among them will be further refined in the robust estimation stage. 50 100 150 200 250 300 350 50 100 150 200 250 300 350 400 450 500 50 100 150 200 250 300 350 50 100 150 200 250 300 350 400 450 500 Fig. 1. Examples of SIFT features. The size of the circle is proportional to scale of the feature. In the original matching scheme described in [7] a pair of keypoints is considered a match if the distance ratio between the closest match and second closest one is below some threshold τ r : d 2 (f, f 1 st) d 2 (f, f 2 nd) < τ 2 r, (1) where f R n is the descriptor to be matched and f 1 st and f 2 nd are the nearest and the second nearest descriptors from the model database, with d(.,.) denoting the Euclidean distance between two descriptors. The threshold τ r = 0.8 suggested in [7] was found effective for general object recognition. This ratio threshold is effective because correct discriminative keypoints often have the closest neighbor significantly closer than the closest incorrect match. In the context of buildings and street scenes, which contain many repetitive structures (e.g. windows), the above criterion will reject many possible matches, since often multiple nearest neighbors may have very close distances in the space of descriptors. Hence we chose to add another criterion, which considers two keypoints as matched, when the cosine of the angle between their IV. MOTION ESTIMATION Given the top 5 closest views the goal of this stage is to compute camera motion between the query view and the reference views, assuming that there is sufficient amount of overlap between the views. The camera motion between the query view and the matched reference view is represented as g = (R, T ), where R SO(3) is the rotation and T = [t x, t y, t z ] T R 3 is the translation. The corresponding points obey the epipolar constraint and are related by so called essential matrix; x T 2 Ex 1 = 0, (3) where x 2 and x 1 are image coordinates of correspondences and E = ˆT R. Given the correspondences obtained in the feature matching stage, the essential matrix can be estimated using a standard eight point algorithm. Once E is estimated, it can be decomposed to 4 motions. One unique solution up to a scale can be obtained using positive depth constraint. The essential matrix model is suitable, when corresponding points are in general position. In case the correspondences come from a plane, the 8-point algorithm becomes degenerate and planar model needs to be used. In planar case the corresponding points are related by a homography model: x T 2 (R + 1 d T N T )x 1 Hx 1 (4) where N is the plane normal and d is the distance of the plane from the origin. Given at least 4 correspondences, H can be estimated using 4-point linear algorithm. Given H there are two physically possible solutions for decomposition into R, T and N, d. The correct solution can be identified by either having some prior knowledge about the scene s plane normal or by using additional view (and its associated homography)

JOURNAL OF L A TEX CLASS FILES, VOL. 6, NO. 1, JANUARY 2007 3 Inlier ratio 60% 50% 40% 30% 20% F 106 382 1827 13696 234041 H 22 47 116 369 1871 TABLE I THE THEORETICAL NUMBER OF SAMPLES S REQUIRED FOR RANSAC TO ENSURE 95% CONFIDENCE THAT ONE OUTLIER FREE SAMPLE IS OBTAINED FOR ESTIMATION OF F (SEVEN-POINT SAMPLE) AND H (FOUR-POINT SAMPLE). THE ACTUAL REQUIRED NUMBER MIGHT BE MAGNITUDE MORE. and choosing the solutions where the two plane normals are consistent. The decomposition of the essential matrix and planar homography is a standard textbook material. We will refer the reader to Chapter 5 of [12] for the decomposition formulas. b) Camera Calibration: The above models assume that the intrinsic camera parameters are known. In the context of our application the camera is calibrated from a single view, using vanishing points information. Vanishing points can often be found reliably in man-made environments. In case three vanishing directions can be recovered, assuming zero skew and aspect ratio is 1, both the focal length and center of projection can be recovered [13]. A. Robust Estimation The matches used in the location recognition stage typically contain many mismatches. Although they are sufficient for selecting the likely reference views, the ranking of the views and the search for the true correspondences must be refined by imposing global geometric constraints. The RANSAC [14] algorithm is commonly used technique for robust estimation of the model parameters. The standard RANSAC algorithm first randomly selects S samples, for each sample estimates parameters of the model hypothesis and finds the support (typically, the number of inliers) for this hypothesis. In the second stage the hypothesis with the largest support is chosen as model and all its inliers are used to refine the model parameters. Standard analysis assumes, that given the minimal number of data points k needed to estimate the model and the fraction of the outliers ɛ, we can compute the probability ρ that given s samples at least one of the samples is outlier free as: ρ = 1 (1 (1 ɛ) k ) s. (5) In order to achieve a desired probability (confidence) ρ of an outlier free hypothesis and provided that the outlier fraction ɛ is known, we can compute from the above equation the required number of samples: S = ln(1 ρ) ln(1 (1 ɛ) k ). (6) where k is the number of points per sample and ɛ is the fraction of outliers. Table I shows, that when the inlier ratio is low a large number of samples is needed for estimation of fundamental (essential) matrix. In addition to the large number of samples, the standard RANSAC requires knowledge of the residual threshold for inliers and the ratio of inliers. Due to the viewpoint change and a large amount of repetitive structures, usually a large percentage (> 50%) of matches is not correct, so the amount of required samples is often prohibitive. Furthermore as pointed out by [15], the above numbers of samples is wildly optimistic. In practice, the number of samples required to reach a good hypothesis is of an order of magnitude more. The experiments in [16] also validate this rule. The actual number of samples needed for 99% confidence is in the order of 5000. When ɛ = 0.7, the number of required samples is 45658. Consequently, the number of hypotheses to be evaluated will be on the order of 10 5. The earlier improvements of RANSAC for motion estimation, which considered parametric noise models [15], [17], typically considered scenarios where correspondences were attained by means of feature tracking in the video sequence. In such settings, the percentage of the outliers rarely exceeded 30%. Our work is motivated by recent advances in wide baseline matching and motion estimation from widely separated views and is most advantageous in this context. Here the number of potential correspondences is usually higher (on the order of 10 2-10 3 ), but in certain environments the percentage of outliers easily exceeds 50%. B. The proposed scheme Here we describe a novel algorithm to deal with this problem. Similarly as in the standard RANSAC scheme we first use sampling to generate a set of hypotheses (i.e. fundamental matrices). This is achieved by sampling the set of correspondences by selecting 8-point samples and estimating F using the standard 8-point algorithm with normalization. At this stage our method dramatically departs from the previously proposed approaches. Instead of evaluating each hypothesis, we propose to evaluate residuals of each correspondence and classify the points as inliers/outliers directly. For each data point (e.g. correspondence) we study the distribution of the errors with respect to all hypotheses. For each hypothesis F j instead of considering residual error r 2 = (x it 2 F j x i 1) 2 we use the so called Sampson error. Sampson distance is a first order approximation of the re-projection error. Given a fundamental matrix F, the Sampson error for i th correspondence is defined as: E s = (x it 2 F x i 1) 2 (F x i 1 )2 1 + (F xi 1 )2 2 + (F T x i 2 )2 1 + (F T x i 2 )2 2 where x i 1 and x i 2 are the image coordinates of corresponding points and (F x) 2 k represents the square of the k-th entry of the vector F x. Figure 2 shows typical error distributions with respect to all generated hypotheses for a data containing 30% outliers. The data was generated using a total of 200 3D points in general position with depth variation of 1000 projected into two views related by general motion. The inliers were corrupted by a zero mean Gaussian noise and standard deviation of 2 pixels, while the inliers were assumed to be uniformly distributed in the interval [ 50, 20] [20, 50] pixels. In this case, the error distributions of inliers and outliers are well separated. The residuals are computed with respect to 500 hypotheses generated in the sampling stage. (7)

JOURNAL OF L A TEX CLASS FILES, VOL. 6, NO. 1, JANUARY 2007 4 Fig. 2. Histogram of residuals for a true inlier and a true outlier with the outlier rattion ɛ = 0.3 and number of samples S = 500. Note that the residual histograms of the inliers and outliers are very different. The inliers typically have a strong peak close to 0, while the outliers distribution is more wide-spread. We will use this observation for classification of the points to inliers and outliers based on n th order statistics of their residual distribution. Our approach exploits the fact that the residuals of the inliers are noticeably lower, even with respect to hypotheses which contain outliers. Hence, the hypotheses which contain some small number of outliers, contribute to the peak of the inliers residual histogram. These qualitatively different properties of residual distributions for inliers and outliers can be captured by lower order statistics computed from the distributions. We used skewness and kurtosis, which yield qualitatively different values for inliers and outliers. Skewness γ measures the asymmetry of the data around the sample mean µ and kurtosis β is the degree of peakedness of a distribution. They are defined as: E(x µ)3 E(x µ)4 γ = σ 3 and β = σ 4 (8) Skewness of the normal distribution (or any perfectly symmetric distribution) is zero. If the value of skewness is positive, the data are spread out more to the right of the mean than to the left. For the two histograms shown in Figure 2, the kurtosis and skewness for the inlier are 24.4 and 4.6, while for the outlier they are much smaller: 7.6 and 1.7, respectively. Given these features the problem of inlier identification is then formulated as a classification problem. Figure 3 shows the plots of the values of skewness and kurtosis for each data point in 2D for outlier ratios 0.3 and 0.5. As we can see the kurtosis and skewness are correlated. In our experiments, only kurtosis is used for identifying the inliers. Inliers can be easily separated, either by a k-means clustering algorithm or simply by ranking the points in the order of decreasing kurtosis and considering the top k to be inliers. Notice that the true inliers have kurtosis with a much larger variance than the outliers. Consequently, some inliers can be missclassified as outliers after the grouping. This, however, will not cause a problem for the model estimation, because enough true inliers are identified. Also, a small number of true outliers might be included in the identified inliers set. The standard RANSAC can be applied to this new inlier set. The computational demands of this second stage are very low since the outlier percentage is very small in this case with no more than 10% outliers as our experiments show. Fig. 3. Kurtosis and skewness of all data points, o denotes inliers and x outliers with 500 samples. The outlier ratio is 0.3 the outlier ration is 0.5. Outlier errors were uniformly distributed between [ 50, 20] [20, 50]; Notice that in Figure 2 the outliers histogram of residuals can also have a high count in the first bin because some hypotheses are generated using the samples which contain the outlier itself. For this reason, the 1 st bin was set to 0 prior to computation of the statistics. Considering that the size of the image plane is 400 600, the error histogram has 150 bins representing the Sampson error ranging from 0 to 149 (large enough to capture the detail of the error distribution). We disregard errors greater than 149. In the above experiments the number of samples used to generate the hypotheses is set to be N = 500. We examine this choice more closely in the next paragraph. c) Number of samples.: Since the method uses the entire ensamble of hypotheses, it is difficult to establish a bound on the number of samples related to a desired confidence as done in standard RANSAC. We study this relationship in simulation by measuring the separability of the inliers and outliers as a function of the number of samples. The Jeffries-Matusita distance measure of separability is used to assess how well two classes may be separated. Assuming that the two classes can be represented by normal distributions with N(µ i, C i ) and N(µ j, C j ) the Jeffries-Matusita distance is computed as where α = 1 8 (µ i µ j ) T ( JM ij = 2(1 e α ) (9) 2 C i + C j ) ( (µ i µ j )+ 1 1 2 ln 2 C ) i + C j Ci C j The Jeffries-Matusita distance has an upper bound of 1.414( 2), and a lower bound of 0. When the calculated distance has a value of the upper bound, the signatures can be said to be totally separable, while the signatures are inseparable when the calculated distance is 0. For a given outlier ratio, we ran 100 trials of the proposed method and estimated the two clusters based on their kurtosis measure. Mean and standard deviation for both outliers and inliers were obtained in each run. Then we used the average of those means and standard deviations to compute JM distance for the particular number of samples. Figure 4 shows the simulation for data with different outlier ratios. As shown, the separability improves when the number of samples increases. However, after 500 samples, the separability wouldn t improve much as the number of samples increases. In the case of lower outlier ratios smaller number of

JOURNAL OF L A TEX CLASS FILES, VOL. 6, NO. 1, JANUARY 2007 5 samples is sufficient. Lowering the number of samples further will affect the quality of the skewness and kurtosis estimates. Since we would like to have a method which works for a range of outlier ratios we choose the number of samples which has been shown in simulation (Figure 4) to provide a good separation of outliers and inliers for high outlier ratios. confidence interval of that of outliers. Therefore, the kurtosis of an error histogram associated with inliers and outliers are statistically different, and an inlier group obtained through k-means clustering is very unlikely to contain true outliers. When the outlier percentage increases further, but no more than 0.7, the mean of inliers kurtosis is close to the upper bound of that of outliers. In this case, the inlier cluster obtained from k-means may contain some true outliers, but the percentage will be much lower than in the original data. As we mentioned before, an additional step of standard RANSAC on this inlier group can obtain a model parameters with a small number of samples. When the outlier percentage goes further to 0.75, inliers and outliers become indistinguishable. The fact that only the hypothesis with one, two and three outliers significantly contribute to the kurtotic behavior of inliers residual distribution is demonstrated in Figure 6. The plot 6 shows different distributions of the mean inlier residuals, for different number of outliers present in each sample and their corresponding kurtosis. The number of outliers in each sample was fixed for each distribution. Fig. 4. The JM distance changes with the number of samples. Note that it increases little after 500 samples. d) Outlier ratio.: Once the outlier percentage exceeds 65%, the proposed method is not as effective. This constitutes the limiting case of our method. Increasing the number of samples would not help, since with the increasing number of samples the number of hypotheses with a significant fraction of outliers would also increase. Figure 5 depicts the separation of inliers and outliers in the skewness/kurtosis space as the outlier ratio increases. he settings for the experiment were the same as in Figure 2. We can see that kurtosis value of outliers is always small because they have no significant peaks. The kurtosis of inliers is much larger at first, meaning their error distributions do have strong peaks. It then decreases as more outliers are added because outliers would disperse the peaks. When the fraction of outliers ɛ is less than 0.6, the mean of kurtosis computed based on inliers is above the 95% Kurtosis value 80 70 60 50 40 30 20 Mean of inliers Mean of outliers Lower bound of inliers Upper bound of inliers Lower bound of outliers Upper bound of outliers Fig. 6. Distribution of mean residuals of inlier points as a function of number of outliers in the generated hypotheses; kurtosis values of the same distributions. Note that for hypotheses with more then 3 outliers the curve flattens out. e) Asymptotic running time analysis.: Note that the proposed scheme does not need a predefined threshold for inlier identification, nor does it require prior knowledge of the outlier ratio. The computation of histogram analysis is very efficient in comparison with the computations in the sampling stage. Given N samples and C correspondences, constructing the histograms takes O(N C) and computing the value of kurtosis takes O(N C) multiplications; the classification in 1- D kurtosis space is very efficient. Overall computation time is less than the second hypothesis evaluation stage of standard RANSAC which requires O(N C) matrix multiplications. For the scenarios examined by simulations and in real experiments, the number of samples used was 500 with outlier ratios greater then 0.6. This is an improvement of an order of magnitude compared to the standard RANSAC method. 10 0 10 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 Fraction of outliers Fig. 5. Mean and 95% confidence interval of inliers kurtosis are shown in red, mean and 95% confidence interval of outliers kurtosis are shown in blue. C. Motion model selection In the context of this application, the general motion model captured by fundamental matrix F is often not appropriate and the homography model is favored for the following reasons: 1) Buildings are dominant in city scenes. It is likely that corresponding points are located in planar building

JOURNAL OF L A TEX CLASS FILES, VOL. 6, NO. 1, JANUARY 2007 6 (c) Fig. 8. original image pair. correspondences found by matching of SIFT features. (c) correct correspondences, which lie in one plane, are identified using homography model. Fig. 7. The matching points connected by dashed red line are not correct correspondences, yet they are chosen as inliers because their errors are along the epipolar lines. The system determines whether the fundamental matrix is needed by checking the homography fitting result. If the number of inliers of the estimated homography is lower than some threshold τ N, a fundamental matrix will be fitted instead; τ N is set to be 0.2N, where N is the number of putative matches. PIC 7 729small facades. Even the case when correspondences are in general position, usually a large number of points come from the same plane. 2) Inliers decision of the fundamental matrix is based on residuals measured by the Sampson distance. Thus the error along the epipolar line is not accounted for. This makes the process of inlier identification for fundamental matrix more difficult. It is often the case that features are matched to wrong locations, but their Sampson errors are small and hence they are considered as inliers, as shown in Figure 7. This is more likely to happen when there are many repetitive structures in the scene. In the presented system we always attempt to fit the homography to the correspondences set first. In case homography model is selected, in addition to the gross outliers (the incorrect correspondences), those correct correspondences which does not comply with the homography constitute the pseudo outliers. Even though the inlier ratio would be less than the actual percentage of correct correspondences, a correct homography can still be obtained as long as enough points come from one plane. As shown in Table I, even with only 20% inliers, theoretically 1871 samples are enough obtain the correct estimate. Of course, more samples are needed in practice. We use 5000 samples to ensure that correct homography can be obtained. As Figure 8 demonstrates, even though building facade only takes a small portion of the image, correct correspondences can still be obtained based on the homography model. For the scenes where there are no major planes as shown in Figure 9, a homography model does not have sufficient support. In those cases, a fundamental matrix model is chosen. Fig. 9. Fundamental matrix based inlier identification. V. FINAL LOCALIZATION Based on the motion estimation results, we re-rank the top 5 reference views based on the number of correctly identified matches. Top 3 views are selected, then two best reference views are chosen for the final localization. Notice they are not simply the top 2 views. In this case, not only the two reference views need to be close neighbors of the query view (so that motion between query view and them can be reliably estimated), but also the motion between the two reference views needs to be reliably estimated. It may happen that viewpoint change between the top 2 views is quite large and correspondences can not be set up reliably. To address the problem, we select from 2 nd and 3 rd views the closest view to the 1 st nearest neighbor. This selected view, together with the 1 st nearest neighbor, constitute the two reference views. If all three camera motions can be recovered, the location of the query view can be obtained by triangulation. Let (R 1q, T 1q ) be the motion between the first reference view

JOURNAL OF LATEX CLASS FILES, VOL. 6, NO. 1, JANUARY 2007 and the query view, (R2q, T2q ) be the motion between the second reference view and the query view and (R12, T12 ) be the motion between the first and the second reference view. Note T12 and T1q are with respect to the coordinate system of the first view, while T2q is not. For the triangulation to proceed, they need to be represented in same coordinate system as the 1 0 other two translations. Hence we set T2q = R12 T2q. The translation vectors are then projected to the plane, disregarding their vertical component, since we only need plane coordinates. Now the three translation vectors, all in the coordinate system of the first reference view, determine the shape of a triangle with three vertexes being the three positions (query, first and second reference). Since the positions of the first and second reference are known, the size of the triangle is also fixed. Thus the location of the query view can be determined. In some cases, even though two reference views can be found, the motion between them can t be reliably estimated because they are widely separated and have a small overlap. Our solution to this situation is to interpolate the positions of the two reference views. Assuming that closer view would have more correspondences with the query view, the query position is computed as: 7 where R = 6.3713 106. When the Euclidean coordinates are obtained, they can be converted into spherical coordinate by inverting Equation 10. Figure 10 and Figure 11 demonstrate two examples where the triangulation of motion vectors is used to calculate position. In comparison with ground truth, the localization error is within 4 meters for Figure 10 and within 2 meters for Figure 11. Figure 12 shows an example when interpolation was used for localization. The localization error is 8 meters. Figure 13 shows an example where only one reference view can be identified. In this case, the location of the reference view is assigned to the query view. Table II summarizes the experimental results for the dataset which was used to evaluate contest results. Based on the scoring criteria of the contest, the average score of the results is 3.68. This result is better than our submission for the contest and other reported results, which can be found in (http://research.microsoft.com/iccv2005/contest/results/). Nref 1 Pref 1 + Nref 2 Pref 2, Nref 1 + Nref 2 where Nref represents the number of correspondences and Pref represents the location of reference view. The system would choose this solution when the number of identified inliers is less than some threshold (16 in our experiments). Note that there are cases when only one reference view can be found. The reason is that some reference views are widely separated (having little overlap) and the query view happened to be close to one of them, or the query view is extrapolated (outside the location range of reference views). In the system, if the number of identified inliers for the second reference view is too limited (8 in our experiments), only one reference view will be used and its position is assigned to the query view. Fig. 10. An example where localization is based on the triangulation and all three motions can be estimated using the homography model. Left: Identified correspondences between the query view (top) and the first reference view (bottom). Center: Identified correspondences between the query view (top) and the second reference view (bottom). Right: Identified correspondences between the second view (top) and the first reference view (bottom). VI. E XPERIMENT Our experiments were based on the dataset provided by 2005 ICCV Vision Contest, taken by Richard Szeliski (http://research.microsoft.com/iccv2005/contest/). The images in the datasets are not ordered, making the multi-view relationships difficult to obtain. The GPS position of a subset of images are provided and the locations of the unlabeled images need to be estimated. The ground truth position of those unlabeled images are also provided. Prior to feature extraction, we sub-sampled the images and alleviated the radial distortion using a fixed coefficient for all images. The GPS positions are in the spherical coordinates (latitude/longitde) of the Earth, not the Euclidean coordinates (meter) which is needed here. The conversion to meters is given by: dlong dlat d = R cos((lat0 + Lat1 )/2) sin(long1 Long0 ) = R sin(lat1 Lat0 ) q = (dlong )2 + (dlat )2 (10) Fig. 11. Another example where localization is based on the triangulation and all three motions can be estimated based on fundamental matrix. Left: Identified correspondences between the query view (top) and the first reference view (bottom). Center: Identified correspondences between the query view (top) and the second reference view (bottom). Right: Identified correspondences between the second view (top) and the first reference view (bottom). Error range Distribution < 2m 7 < 4m 3 < 8m 6 < 16m 6 > 16m 0 TABLE II D ISTRIBUTION OF THE LOCALIZATION ERRORS. VII. C ONCLUSIONS In this paper we presented an approach for image based localization in urban environments. The method is comprised

JOURNAL OF L A TEX CLASS FILES, VOL. 6, NO. 1, JANUARY 2007 8 carrying out additional search for matches, in case there is little overlap between the reference views. The accuracy could be further improved by non-linear refinement of the motion estimates and more accurate off-line calibration stage. The accuracy of system depends on the density of the model views available in the database. Therefore, selection of optimal set of model views requires further investigation. Fig. 12. Two reference views can be found, yet they have no overlap. Therefore the motion estimation between reference views is not possible and the interpolation of these positions is used instead. Left: Identified correspondences between the query view (top) and the first reference view (bottom). Right: Identified correspondences between the query view (top) and the second reference view (bottom). REFERENCES [1] W. Zhang and J. Kosecka, A new inlier identification procedure for robust estimation problems, in Robotics: Science and Systems, 2006. [2] D. Robertson and R. Cipolla, An image-based system for urban navigation, in BMVC, 2004. [3] H. Shao, T. Svoboda, T. Tuytelaars, and L. Van Gool, Hpat indexing for fast object/scene recognition based on local appearance, in Computer Lecture Notes on Image and Video Retrieval, July 2003, pp. 71 80. [4] T. Goedeme and T. Tuytelaars, Fast wide baseline matching for visual navigation, in CVPR 04, 2004, pp. 24 29. [5] T. Yeh, K. Tollmar, and T. Darrell, Searching the web with mobile images for location recognition, in CVPR, 2004. [6] M. Brown, G. Schindler, and R. Szeliski, City-scale location recognition, in CVPR, 2007. [7] D. Lowe, Distinctive image features from scale-invariant keypoints, IJCV, 2004. [8] C. Schmid and R. Mohr, Local greyvalue invariants for image retrieval, Pattern Analysis and Machine Intelligence, vol. 19, pp. 530 535, 1997. [9] T. Tuytelaars and L. Van Gool., Matching widely separated views based on affine invariant regions, IJCV, vol. 59, 2004. [10] Jiri Matas, Ondrej Chum, M. Urban, and Tomas Pajdla, Robust wide baseline stereo from maximally stable extremal regions, in BMVC 02, 2002, pp. 384 393. [11] K. Mikolajczk and C. Schmid, A performance evaluation of local descriptors, in CVPR 2003, 2003. [12] Yi Ma, Stefano Soatto, Jana Kosecka, and Shankar Sastry, An Invitation to 3D Vision: From Images to Models, Springer Verlag, 2003. [13] J. Kosecka and W. Zhang, Video compass, in Proceedings of European Conference on Computer Vision, 2002, pp. 657 673. [14] M. A. Fischler and R. C. Bolles, Random sample consensus: a paradigm for model fitting with applications to image analysis and automated cartography, in ECCV 96, 1996, pp. 683 695. [15] B. Tordoff and D. Murray, Giuded sampling and consensus for motion estimation, in ECCV, 2002. [16] Jiri Matas and Ondrej Chum, Randomized ransac with t(d,d) test, in BMVC02, 2002, pp. 448 457. [17] P. Torr and A. Zisserman, Mlesac: A new robust estimator with application to estimating image geometry, CVIU, vol. 78, pp. 138 156, 2000. Fig. 13. Only one reference view (bottom) can be found for the query image (top), because the query view is extrapolated. of three phases: coarse location recognition, camera motion estimation between query and reference views and final position triangulation. The coarse location recognition is based on the matches of SIFT keypoints. A novel robust estimation technique is used for motion estimation based on the putative matches which usually contains large portion of outliers. Thus the efficiency of the system is ensured in addition to the accuracy. Appropriate motion model is automatically selected for different scenes. The system is shown to be both accurate and efficient based on the dataset provided by ICCV Computer Vision Contest. Further improvements can be obtained by