Docsity

Robust Feature Matching in Computer Vision: Techniques and Algorithms - Prof. Serge J. Bel, Study notes of Computer Science

Toggle sidebar
bg1
CSE 252B: Computer Vision II
Lecturer: Serge Belongie
Scribes: Jeremy Pollock and Neil Alldrin
LECTURE 14
Robust Feature Matching
14.1. Introduction
Last lecture we learned how to find interest points using the F¨orstner cor-
ner detector. The goal of this lecture is to find correspondences between
these points automatically. This is known as the correspondence problem.
The correspondence problem is arguably the hardest problem in structure
from motion (SFM). For example, one must deal with pointsets of different
length, with spurious coordinates and positional noise. All of SFM relies on
the success of finding correspondence between points in the two images. If
you have two views that are too widely separated, it can become difficult
to match interest points for purposes of estimating a homography or funda-
mental matrix. Correspondence is an absolutely critical part of the vision
problem.
14.2. The Correspondence Problem
There are two categories of correspondence problems: wide baseline and
small baseline. Wide baseline stereo pairs are taken by cameras separated
1Department of Computer Science and Engineering, University of California, San Diego.
May 19, 2004
1
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download Robust Feature Matching in Computer Vision: Techniques and Algorithms - Prof. Serge J. Bel and more Study notes Computer Science in PDF only on Docsity!

CSE 252B: Computer Vision II

Lecturer: Serge Belongie

Scribes: Jeremy Pollock and Neil Alldrin

LECTURE 14

Robust Feature Matching

14.1. Introduction

Last lecture we learned how to find interest points using the F¨orstner cor- ner detector. The goal of this lecture is to find correspondences between these points automatically. This is known as the correspondence problem. The correspondence problem is arguably the hardest problem in structure from motion (SFM). For example, one must deal with pointsets of different length, with spurious coordinates and positional noise. All of SFM relies on the success of finding correspondence between points in the two images. If you have two views that are too widely separated, it can become difficult to match interest points for purposes of estimating a homography or funda- mental matrix. Correspondence is an absolutely critical part of the vision problem.

14.2. The Correspondence Problem

There are two categories of correspondence problems: wide baseline and small baseline. Wide baseline stereo pairs are taken by cameras separated

(^1) Department of Computer Science and Engineering, University of California, San Diego.

May 19, 2004

1

2 SERGE BELONGIE, CSE 252B: COMPUTER VISION II

I 1

I 2

Image 1 Image 2

Figure 1. I 1 and I 2 are neighborhoods surrounding interest points in the two images.

by a large translation vector, and the images typically exhibit significant par- allax. Small baseline stereo correspondence often arises in video sequences, where the observed change between each successive frame is very small. The correspondence problem also arises in object recognition. In object recognition, the correspondence problem is much harder because the input is an image of any of a number of different instances of objects that must be classified as belonging to the same category. For instance, one might want to recognize an object as being (or not being) a chalkboard eraser from multiple viewing angles. The correspondence problem then is to find matching points between two instances that are not physically identical. The physical structure among instances of chalkboard erasers is similar (box- like, with reasonable corners), but is different in appearance (consider a new eraser in comparison to a worn, used one). In object recognition, there are so many ways an object can be deformed or distorted that the problem becomes exceedingly difficult. SFM, on the other hand, provides a more constrained setting. In SFM we can intertwine the process of recovering epipolar geometry and feature extraction by using our knowledge of the relationships between two views of a rigid scene. Before we can proceed, we need a point descriptor and a measure of similarity. The simplest descriptor of some point in an image is a small window, or neighborhood, surrounding the point of interest.

4 SERGE BELONGIE, CSE 252B: COMPUTER VISION II

result is a divide by zero and “NCC blows up”. However, in our setting, this is not a problem because the only points of interest that NCC will consider should be windows containing a corner (from the feature detector); the feature detector will only return neighborhoods of rank 2. There’s a certain spatial model of transformation that is implicit here; that is the translational model, with 2 degrees of freedom:

x′^ −→ x + t

where x = (x, y)⊤^ and t = (tx, ty )⊤. The translational model is implicit in what we’re doing with square patches being moved around the image. Another possibility is the affine model, with 6 degrees of freedom:

x′^ −→ Ax + t

where A ∈ GL(2). The affine model allows you to search over rotations, scalings, and shears of a patch, but involves a six parameter search, which is more costly.

14.3. RANSAC (RANdom SAmple Consensus)

In general there are all kinds of photometric and geometric transformations that can occur between two views of a scene. This means normalized cross correlation will sometimes generate spurious correspondences. To robustly fit a model to the correspondences, we need to overcome the effect of these outliers. Random sample consensus (RANSAC) provides a general technique for model fitting in the presence of outliers. The following example demonstrates the general methodology of RANSAC.

LECTURE 14. ROBUST FEATURE MATCHING 5

y

x

Figure 2. Three possible line fits from data points { 1 , ..., 7 }. (1) Least squares solution. (2) Least squares with one outlier, 7, removed. (3) RANSAC based on groups of two points. [Torr & Murray]

Example: Line fitting. See figure 2. Here we illustrate three different types of fit.

(a) The first is classical least squares. Suppose we have reason to believe that these points in the plane should fall on some line. The problem is that there are some outliers in the dataset and least squares is not very tolerant of outliers. If we perform least squares regression, we get line 1 which is obviously corrupted by the outliers. (b) One reasonable alternative is to try least squares while “allow- ing” (ignoring) one outlier. This approach completes a fit to the data and then throws out the single most offensive data- point to the fit. This approach nets us line 2. (c) RANSAC takes this notion of robust fitting to the next level. Line 3 is the line generated by RANSAC running on permu- tations of two points. Start by choosing the model that will describe the data. In our case, we need two points to define a line. RANSAC iterates over all pairs of points and performs a fit. Then, for each of these lines generated by the fit, count the inliers that fall inside some ǫ band around the line. A line with a number of inliers above some threshold is considered a good fit. In our example, examining line 3, generated by say points 2 and 5, five points in total fall inside the ǫ band. For the pair of points 4 and 7, only three points fall inside the ǫ band. For points 4 and 6, only those two fall inside the ǫ band. Therefore line 3 is the optimal fit because it is supported by the most points.

LECTURE 14. ROBUST FEATURE MATCHING 7

Figure 3. Points mapped by a planar homography.

Correspondences Error Measure H 4 pts “epsilon ball” F 7 or 8 pts Sampson Distance

Figure 4. Summary of the minimal number of points and error measure for homography and fundamental matrix estimation.

(a) Find a set of interest points in each image (b) Use NCC to determine correspondences (c) Use RANSAC to fit H and label outlier correspondences (d) Estimate the homography using the four point algorithm on the complete set of inlier correspondences

Once the homography has been estimated, map all points in the second image onto the first image (called the reference image). See figure 6. One potential problem with mapping images onto each other is that errors in the mapping can lead to artifacts in the overlap areas of the composite image. This can be ameliorated by a variety of blending techniques. J. Davis [CVPR 1998] proposes an interesting method that finds a minimal cost boundary between the reference image and the mapped image. For mosaicing multiple images, a single reference view can be selected and images can be mapped onto the reference image pairwise. For cases

8 SERGE BELONGIE, CSE 252B: COMPUTER VISION II

(a) (b)

(c) (d)

(e) (f)

(g) (h)

Figure 5. Homography estimation using NCC and RANSAC (from H&Z). (a) Image 1. (b) Image 2. (c) and (d) Interest points returned by a corner detector. (e) Set of correspondences found by NCC. (f) Set of out- liers determined by RANSAC. (g) Set of inliers determined by RANSAC. (h) Refined correspondences based on inliers found by RANSAC.