automatic panoramic image stitching using local features

61
Automatic Panoramic Image Stitching using Local Features Matthew Brown and David Lowe, University of British Columbia

Upload: makaio

Post on 02-Feb-2016

64 views

Category:

Documents


0 download

DESCRIPTION

Automatic Panoramic Image Stitching using Local Features. Matthew Brown and David Lowe, University of British Columbia. Introduction. Are you getting the whole picture? Compact Camera FOV = 50 x 35°. Introduction. Are you getting the whole picture? Compact Camera FOV = 50 x 35° - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Automatic Panoramic Image Stitching using Local Features

Automatic Panoramic Image Stitching using Local Features

Matthew Brown and David Lowe, University of British Columbia

Page 2: Automatic Panoramic Image Stitching using Local Features

Introduction

• Are you getting the whole picture?– Compact Camera FOV = 50 x 35°

Page 3: Automatic Panoramic Image Stitching using Local Features

Introduction

• Are you getting the whole picture?– Compact Camera FOV = 50 x 35°– Human FOV = 200 x 135°

Page 4: Automatic Panoramic Image Stitching using Local Features

Introduction

• Are you getting the whole picture?– Compact Camera FOV = 50 x 35°– Human FOV = 200 x 135°– Panoramic Mosaic = 360 x 180°

Page 5: Automatic Panoramic Image Stitching using Local Features

Why Use Local Features?

Page 6: Automatic Panoramic Image Stitching using Local Features

Why Use Local Features?

• 1D Rotations ()– Ordering matching images

Page 7: Automatic Panoramic Image Stitching using Local Features

Why Use Local Features?

• 1D Rotations ()– Ordering matching images

Page 8: Automatic Panoramic Image Stitching using Local Features

Why Use Local Features?

• 1D Rotations ()– Ordering matching images

Page 9: Automatic Panoramic Image Stitching using Local Features

Why Use Local Features?

• 2D Rotations (, )– Ordering matching images

• 1D Rotations ()– Ordering matching images

Page 10: Automatic Panoramic Image Stitching using Local Features

Why Use Local Features?

• 1D Rotations ()– Ordering matching images

• 2D Rotations (, )– Ordering matching images

Page 11: Automatic Panoramic Image Stitching using Local Features

Why Use Local Features?

• 1D Rotations ()– Ordering matching images

• 2D Rotations (, )– Ordering matching images

Page 12: Automatic Panoramic Image Stitching using Local Features

Recognising Panoramas

[ Brown and Lowe ICCV 2003, IJCV 2007 ]

Page 13: Automatic Panoramic Image Stitching using Local Features

Automatic Stitching

• Feature Matching• Image Matching• Image Alignment• Rendering• Results• Conclusions

Page 14: Automatic Panoramic Image Stitching using Local Features

Automatic Stitching

• Feature Matching– SIFT Features– Nearest Neighbour Matching

• Image Matching• Image Alignment• Rendering• Results• Conclusions

Page 15: Automatic Panoramic Image Stitching using Local Features

Invariant Features

• Schmid & Mohr 1997, Lowe 1999, Baumberg 2000, Tuytelaars & Van Gool 2000, Mikolajczyk & Schmid 2001, Brown & Lowe 2002, Matas et. al. 2002, Schaffalitzky & Zisserman 2002

Page 16: Automatic Panoramic Image Stitching using Local Features

SIFT Features

• Invariant Features– Establish invariant frame

• Maxima/minima of scale-space DOG x, y, s• Maximum of distribution of local gradients

– Form descriptor vector• Histogram of smoothed local gradients• 128 dimensions

• SIFT features are…– Geometrically invariant to similarity transforms,

• some robustness to affine change

– Photometrically invariant to affine changes in intensity

Page 17: Automatic Panoramic Image Stitching using Local Features

Automatic Stitching

• Feature Matching– SIFT Features– Nearest Neighbour Matching

• Image Matching• Image Alignment• Rendering• Results• Conclusions

Page 18: Automatic Panoramic Image Stitching using Local Features

Nearest Neighbour Matching

• Nearest neighbour matching

• Use k-d tree– k-d tree recursively bi-partitions data at mean in the

dimension of maximum variance– Approximate nearest neighbours found in O(n log n)

• Find k-NN for each feature– k number of overlapping images (we use k = 4)

[ Beis Lowe 1997, Nene Nayar 1997, Gray Moore 2000, Shakhnarovich 2003 ]

Page 19: Automatic Panoramic Image Stitching using Local Features

K-d tree

Page 20: Automatic Panoramic Image Stitching using Local Features

K-d tree

Page 21: Automatic Panoramic Image Stitching using Local Features

Automatic Stitching

• Feature Matching• Image Matching

– Motion Model– RANSAC

• Image Alignment• Rendering• Results• Conclusions

Page 22: Automatic Panoramic Image Stitching using Local Features

2D Motion Models

• Linear (affine)

• Homography

Page 23: Automatic Panoramic Image Stitching using Local Features

• Projection equation

• → pairwise homographies

Homography for Rotation

set t = 0 for a pair

where

Page 24: Automatic Panoramic Image Stitching using Local Features

Automatic Stitching

• Feature Matching• Image Matching

– Motion Model– RANSAC

• Image Alignment• Rendering• Results• Conclusions

Page 25: Automatic Panoramic Image Stitching using Local Features

RANSAC for Homography

Page 26: Automatic Panoramic Image Stitching using Local Features

RANSAC for Homography

Page 27: Automatic Panoramic Image Stitching using Local Features

RANSAC for Homography

Page 28: Automatic Panoramic Image Stitching using Local Features

RANSAC: 1D Line Fitting

least squares line

Page 29: Automatic Panoramic Image Stitching using Local Features

RANSAC: 1D Line Fitting

Page 30: Automatic Panoramic Image Stitching using Local Features

RANSAC: 1D Line FittingRANSACline

Page 31: Automatic Panoramic Image Stitching using Local Features

Match Verification

Page 32: Automatic Panoramic Image Stitching using Local Features

Finding the panoramas

Page 33: Automatic Panoramic Image Stitching using Local Features

Finding the panoramas

Page 34: Automatic Panoramic Image Stitching using Local Features

Finding the panoramas

Page 35: Automatic Panoramic Image Stitching using Local Features

Finding the panoramas

Page 36: Automatic Panoramic Image Stitching using Local Features

Automatic Stitching

• Feature Matching• Image Matching• Image Alignment

– Bundle Adjustment– Automatic Straightening

• Rendering• Results• Conclusions

Page 37: Automatic Panoramic Image Stitching using Local Features

• Recall our image motion model

• Parameterise each camera by rotation and focal length

Motion Model Revisited

Page 38: Automatic Panoramic Image Stitching using Local Features

Bundle Adjustment

• Sum of squared projection errors

– n = #images– I(i) = set of image matches to image i– F(i, j) = set of feature matches between images i,j

– rijk = residual of kth feature match between images i,j

• Huber (robust) error function

Page 39: Automatic Panoramic Image Stitching using Local Features

Bundle Adjustment

• Adjust rotation, focal length of each image to minimise error in matched features

Page 40: Automatic Panoramic Image Stitching using Local Features

Bundle Adjustment

• Adjust rotation, focal length of each image to minimise error in matched features

Page 41: Automatic Panoramic Image Stitching using Local Features

Automatic Stitching

• Feature Matching• Image Matching• Image Alignment

– Bundle Adjustment– Automatic Straightening

• Rendering• Results• Conclusions

Page 42: Automatic Panoramic Image Stitching using Local Features

Automatic Straightening

Page 43: Automatic Panoramic Image Stitching using Local Features

Automatic Straightening

• Heuristic: user does not twist camera relative to horizon

• Up-vector perpendicular to plane of camera x vectors

Page 44: Automatic Panoramic Image Stitching using Local Features

Automatic Straightening

Page 45: Automatic Panoramic Image Stitching using Local Features

Automatic Stitching

• Feature Matching• Image Matching• Image Alignment• Rendering• Results• Conclusions

Page 46: Automatic Panoramic Image Stitching using Local Features

Gain Compensation

• No gain compensation

Page 47: Automatic Panoramic Image Stitching using Local Features

Gain Compensation

• Gain compensation

– Single gain parameter gi for each image

( Better solution = HDR [ Debevec 1997 ] )

Page 48: Automatic Panoramic Image Stitching using Local Features

Multi-band Blending

• No blending

Page 49: Automatic Panoramic Image Stitching using Local Features

Multi-band Blending

• Linear blending

– Each pixel is a weighted sum

Page 50: Automatic Panoramic Image Stitching using Local Features

Multi-band Blending

• Multi-band blending

– Each pixel is a weighted sum (for each band)

Page 51: Automatic Panoramic Image Stitching using Local Features

Multi-band Blending• Linear blending • Multi-band blending

[ Burt Adelson 1983 ]

Page 52: Automatic Panoramic Image Stitching using Local Features

2-band Blending

Page 53: Automatic Panoramic Image Stitching using Local Features

Low frequency ( > 2 pixels)

High frequency ( < 2 pixels)

2-band Blending

Page 54: Automatic Panoramic Image Stitching using Local Features

Seam Selection

• (simple) Choose image with max “weight”:

• (better) …also minimise error on seams

[ Agarwala et al SIGGRAPH 04 ]

Page 55: Automatic Panoramic Image Stitching using Local Features

Automatic Stitching

• Feature Matching• Image Matching• Image Alignment• Rendering• Results• Conclusions

Page 56: Automatic Panoramic Image Stitching using Local Features

Demo

Page 57: Automatic Panoramic Image Stitching using Local Features

Evaluation

• 200+ test sequences…

Page 58: Automatic Panoramic Image Stitching using Local Features

Ground Truth

• Real: stitch “by hand”• Synthetic: sample virtual camera views

Stitched panorama

Synthetic camera views

Page 59: Automatic Panoramic Image Stitching using Local Features

Error function

• Compare test stitch with ground truth– Ground truth– Test stitch

• Evaluation function– sum of pairwise projection errors wrt ground truth

Page 60: Automatic Panoramic Image Stitching using Local Features

Results

• Testing performance (image scale)

• Tuning parameters (Huber sigma)

Page 61: Automatic Panoramic Image Stitching using Local Features

Conclusions

• Image Stitching using Local Features– c.f. “direct methods”: fast, robust, – 2D stitching is a recognition problem

• Multi-Image Matching Framework– Local features, RANSAC, bundle adjustment, blending

• Future Work– camera model += radial distortion, camera

translation, scene motion, vignetting, HDR, flash … – Full 3D case

• e.g. Photo Tourism [Snavely et al SIGGRAPH 2006]

http://research.microsoft.com/~brown