feature matching and ransac 15-463: computational photography alexei efros, cmu, fall 2005 with a...

36
Feature Matching and RANSAC 15-463: Computational Photograph Alexei Efros, CMU, Fall 200 with a lot of slides stolen from Steve Seitz and Rick Szeliski © Krister Parmstrand

Upload: christine-kelly

Post on 23-Dec-2015

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Feature Matching and RANSAC 15-463: Computational Photography Alexei Efros, CMU, Fall 2005 with a lot of slides stolen from Steve Seitz and Rick Szeliski

Feature Matching and RANSAC

15-463: Computational PhotographyAlexei Efros, CMU, Fall 2005

with a lot of slides stolen from Steve Seitz and Rick Szeliski

© Krister Parmstrand

Page 2: Feature Matching and RANSAC 15-463: Computational Photography Alexei Efros, CMU, Fall 2005 with a lot of slides stolen from Steve Seitz and Rick Szeliski

Feature matching

?

Page 3: Feature Matching and RANSAC 15-463: Computational Photography Alexei Efros, CMU, Fall 2005 with a lot of slides stolen from Steve Seitz and Rick Szeliski

Feature matching• Exhaustive search

• for each feature in one image, look at all the other features in the other image(s)

• Hashing• compute a short descriptor from each feature vector, or hash

longer descriptors (randomly)

• Nearest neighbor techniques• k-trees and their variants

Page 4: Feature Matching and RANSAC 15-463: Computational Photography Alexei Efros, CMU, Fall 2005 with a lot of slides stolen from Steve Seitz and Rick Szeliski

What about outliers?

?

Page 5: Feature Matching and RANSAC 15-463: Computational Photography Alexei Efros, CMU, Fall 2005 with a lot of slides stolen from Steve Seitz and Rick Szeliski

Feature-space outlier rejectionLet’s not match all features, but only these that have

“similar enough” matches?

How can we do it? • SSD(patch1,patch2) < threshold• How to set threshold?

Page 6: Feature Matching and RANSAC 15-463: Computational Photography Alexei Efros, CMU, Fall 2005 with a lot of slides stolen from Steve Seitz and Rick Szeliski

Feature-space outlier rejectionA better way [Lowe, 1999]:

• 1-NN: SSD of the closest match• 2-NN: SSD of the second-closest match• Look at how much better 1-NN is than 2-NN, e.g. 1-NN/2-NN• That is, is our best match so much better than the rest?

Page 7: Feature Matching and RANSAC 15-463: Computational Photography Alexei Efros, CMU, Fall 2005 with a lot of slides stolen from Steve Seitz and Rick Szeliski

Feature-space outliner rejection

Can we now compute H from the blue points?• No! Still too many outliers… • What can we do?

Page 8: Feature Matching and RANSAC 15-463: Computational Photography Alexei Efros, CMU, Fall 2005 with a lot of slides stolen from Steve Seitz and Rick Szeliski

Matching features

What do we do about the “bad” matches?

Page 9: Feature Matching and RANSAC 15-463: Computational Photography Alexei Efros, CMU, Fall 2005 with a lot of slides stolen from Steve Seitz and Rick Szeliski

RAndom SAmple Consensus

Select one match, count inliers

Page 10: Feature Matching and RANSAC 15-463: Computational Photography Alexei Efros, CMU, Fall 2005 with a lot of slides stolen from Steve Seitz and Rick Szeliski

RAndom SAmple Consensus

Select one match, count inliers

Page 11: Feature Matching and RANSAC 15-463: Computational Photography Alexei Efros, CMU, Fall 2005 with a lot of slides stolen from Steve Seitz and Rick Szeliski

Least squares fit

Find “average” translation vector

Page 12: Feature Matching and RANSAC 15-463: Computational Photography Alexei Efros, CMU, Fall 2005 with a lot of slides stolen from Steve Seitz and Rick Szeliski

RANSAC for estimating homography

RANSAC loop:

1. Select four feature pairs (at random)

2. Compute homography H (exact)

3. Compute inliers where SSD(pi’, H pi) < ε

4. Keep largest set of inliers

5. Re-compute least-squares H estimate on all of the inliers

Page 13: Feature Matching and RANSAC 15-463: Computational Photography Alexei Efros, CMU, Fall 2005 with a lot of slides stolen from Steve Seitz and Rick Szeliski

RANSAC

Page 14: Feature Matching and RANSAC 15-463: Computational Photography Alexei Efros, CMU, Fall 2005 with a lot of slides stolen from Steve Seitz and Rick Szeliski

Example: Recognising Panoramas

M. Brown and D. Lowe,

University of British Columbia

Page 15: Feature Matching and RANSAC 15-463: Computational Photography Alexei Efros, CMU, Fall 2005 with a lot of slides stolen from Steve Seitz and Rick Szeliski

Why “Recognising Panoramas”?

Page 16: Feature Matching and RANSAC 15-463: Computational Photography Alexei Efros, CMU, Fall 2005 with a lot of slides stolen from Steve Seitz and Rick Szeliski

Why “Recognising Panoramas”?

1D Rotations ()• Ordering matching images

Page 17: Feature Matching and RANSAC 15-463: Computational Photography Alexei Efros, CMU, Fall 2005 with a lot of slides stolen from Steve Seitz and Rick Szeliski

Why “Recognising Panoramas”?

1D Rotations ()• Ordering matching images

Page 18: Feature Matching and RANSAC 15-463: Computational Photography Alexei Efros, CMU, Fall 2005 with a lot of slides stolen from Steve Seitz and Rick Szeliski

Why “Recognising Panoramas”?

1D Rotations ()• Ordering matching images

Page 19: Feature Matching and RANSAC 15-463: Computational Photography Alexei Efros, CMU, Fall 2005 with a lot of slides stolen from Steve Seitz and Rick Szeliski

Why “Recognising Panoramas”?

• 2D Rotations (, )– Ordering matching images

1D Rotations ()• Ordering matching images

Page 20: Feature Matching and RANSAC 15-463: Computational Photography Alexei Efros, CMU, Fall 2005 with a lot of slides stolen from Steve Seitz and Rick Szeliski

Why “Recognising Panoramas”?

1D Rotations ()• Ordering matching images

• 2D Rotations (, )– Ordering matching images

Page 21: Feature Matching and RANSAC 15-463: Computational Photography Alexei Efros, CMU, Fall 2005 with a lot of slides stolen from Steve Seitz and Rick Szeliski

Why “Recognising Panoramas”?

1D Rotations ()• Ordering matching images

• 2D Rotations (, )– Ordering matching images

Page 22: Feature Matching and RANSAC 15-463: Computational Photography Alexei Efros, CMU, Fall 2005 with a lot of slides stolen from Steve Seitz and Rick Szeliski

Why “Recognising Panoramas”?

Page 23: Feature Matching and RANSAC 15-463: Computational Photography Alexei Efros, CMU, Fall 2005 with a lot of slides stolen from Steve Seitz and Rick Szeliski

OverviewFeature Matching

Image Matching

Bundle Adjustment

Multi-band Blending

Results

Conclusions

Page 24: Feature Matching and RANSAC 15-463: Computational Photography Alexei Efros, CMU, Fall 2005 with a lot of slides stolen from Steve Seitz and Rick Szeliski

RANSAC for Homography

Page 25: Feature Matching and RANSAC 15-463: Computational Photography Alexei Efros, CMU, Fall 2005 with a lot of slides stolen from Steve Seitz and Rick Szeliski

RANSAC for Homography

Page 26: Feature Matching and RANSAC 15-463: Computational Photography Alexei Efros, CMU, Fall 2005 with a lot of slides stolen from Steve Seitz and Rick Szeliski

RANSAC for Homography

Page 27: Feature Matching and RANSAC 15-463: Computational Photography Alexei Efros, CMU, Fall 2005 with a lot of slides stolen from Steve Seitz and Rick Szeliski

Probabilistic model for verification

Page 28: Feature Matching and RANSAC 15-463: Computational Photography Alexei Efros, CMU, Fall 2005 with a lot of slides stolen from Steve Seitz and Rick Szeliski

Finding the panoramas

Page 29: Feature Matching and RANSAC 15-463: Computational Photography Alexei Efros, CMU, Fall 2005 with a lot of slides stolen from Steve Seitz and Rick Szeliski

Finding the panoramas

Page 30: Feature Matching and RANSAC 15-463: Computational Photography Alexei Efros, CMU, Fall 2005 with a lot of slides stolen from Steve Seitz and Rick Szeliski

Finding the panoramas

Page 31: Feature Matching and RANSAC 15-463: Computational Photography Alexei Efros, CMU, Fall 2005 with a lot of slides stolen from Steve Seitz and Rick Szeliski

Finding the panoramas

Page 32: Feature Matching and RANSAC 15-463: Computational Photography Alexei Efros, CMU, Fall 2005 with a lot of slides stolen from Steve Seitz and Rick Szeliski

Parameterise each camera by rotation and focal length

This gives pairwise homographies

Homography for Rotation

Page 33: Feature Matching and RANSAC 15-463: Computational Photography Alexei Efros, CMU, Fall 2005 with a lot of slides stolen from Steve Seitz and Rick Szeliski

Bundle AdjustmentNew images initialised with rotation, focal length of best

matching image

Page 34: Feature Matching and RANSAC 15-463: Computational Photography Alexei Efros, CMU, Fall 2005 with a lot of slides stolen from Steve Seitz and Rick Szeliski

Bundle AdjustmentNew images initialised with rotation, focal length of best

matching image

Page 35: Feature Matching and RANSAC 15-463: Computational Photography Alexei Efros, CMU, Fall 2005 with a lot of slides stolen from Steve Seitz and Rick Szeliski

Multi-band BlendingBurt & Adelson 1983

• Blend frequency bands over range

Page 36: Feature Matching and RANSAC 15-463: Computational Photography Alexei Efros, CMU, Fall 2005 with a lot of slides stolen from Steve Seitz and Rick Szeliski

Results