Automatic Panoramic Image Stitching using Local Features
description
Transcript of Automatic Panoramic Image Stitching using Local Features
![Page 1: Automatic Panoramic Image Stitching using Local Features](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/1.jpg)
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](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/2.jpg)
Introduction
• Are you getting the whole picture?– Compact Camera FOV = 50 x 35°
![Page 3: Automatic Panoramic Image Stitching using Local Features](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/3.jpg)
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](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/4.jpg)
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](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/5.jpg)
Why Use Local Features?
![Page 6: Automatic Panoramic Image Stitching using Local Features](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/6.jpg)
Why Use Local Features?
• 1D Rotations ()– Ordering matching images
![Page 7: Automatic Panoramic Image Stitching using Local Features](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/7.jpg)
Why Use Local Features?
• 1D Rotations ()– Ordering matching images
![Page 8: Automatic Panoramic Image Stitching using Local Features](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/8.jpg)
Why Use Local Features?
• 1D Rotations ()– Ordering matching images
![Page 9: Automatic Panoramic Image Stitching using Local Features](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/9.jpg)
Why Use Local Features?
• 2D Rotations (, )– Ordering matching images
• 1D Rotations ()– Ordering matching images
![Page 10: Automatic Panoramic Image Stitching using Local Features](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/10.jpg)
Why Use Local Features?
• 1D Rotations ()– Ordering matching images
• 2D Rotations (, )– Ordering matching images
![Page 11: Automatic Panoramic Image Stitching using Local Features](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/11.jpg)
Why Use Local Features?
• 1D Rotations ()– Ordering matching images
• 2D Rotations (, )– Ordering matching images
![Page 12: Automatic Panoramic Image Stitching using Local Features](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/12.jpg)
Recognising Panoramas
[ Brown and Lowe ICCV 2003, IJCV 2007 ]
![Page 13: Automatic Panoramic Image Stitching using Local Features](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/13.jpg)
Automatic Stitching
• Feature Matching• Image Matching• Image Alignment• Rendering• Results• Conclusions
![Page 14: Automatic Panoramic Image Stitching using Local Features](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/14.jpg)
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](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/15.jpg)
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](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/16.jpg)
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](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/17.jpg)
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](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/18.jpg)
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](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/19.jpg)
K-d tree
![Page 20: Automatic Panoramic Image Stitching using Local Features](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/20.jpg)
K-d tree
![Page 21: Automatic Panoramic Image Stitching using Local Features](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/21.jpg)
Automatic Stitching
• Feature Matching• Image Matching
– Motion Model– RANSAC
• Image Alignment• Rendering• Results• Conclusions
![Page 22: Automatic Panoramic Image Stitching using Local Features](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/22.jpg)
2D Motion Models
• Linear (affine)
• Homography
![Page 23: Automatic Panoramic Image Stitching using Local Features](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/23.jpg)
• Projection equation
• → pairwise homographies
Homography for Rotation
set t = 0 for a pair
where
![Page 24: Automatic Panoramic Image Stitching using Local Features](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/24.jpg)
Automatic Stitching
• Feature Matching• Image Matching
– Motion Model– RANSAC
• Image Alignment• Rendering• Results• Conclusions
![Page 25: Automatic Panoramic Image Stitching using Local Features](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/25.jpg)
RANSAC for Homography
![Page 26: Automatic Panoramic Image Stitching using Local Features](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/26.jpg)
RANSAC for Homography
![Page 27: Automatic Panoramic Image Stitching using Local Features](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/27.jpg)
RANSAC for Homography
![Page 28: Automatic Panoramic Image Stitching using Local Features](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/28.jpg)
RANSAC: 1D Line Fitting
least squares line
![Page 29: Automatic Panoramic Image Stitching using Local Features](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/29.jpg)
RANSAC: 1D Line Fitting
![Page 30: Automatic Panoramic Image Stitching using Local Features](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/30.jpg)
RANSAC: 1D Line FittingRANSACline
![Page 31: Automatic Panoramic Image Stitching using Local Features](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/31.jpg)
Match Verification
![Page 32: Automatic Panoramic Image Stitching using Local Features](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/32.jpg)
Finding the panoramas
![Page 33: Automatic Panoramic Image Stitching using Local Features](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/33.jpg)
Finding the panoramas
![Page 34: Automatic Panoramic Image Stitching using Local Features](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/34.jpg)
Finding the panoramas
![Page 35: Automatic Panoramic Image Stitching using Local Features](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/35.jpg)
Finding the panoramas
![Page 36: Automatic Panoramic Image Stitching using Local Features](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/36.jpg)
Automatic Stitching
• Feature Matching• Image Matching• Image Alignment
– Bundle Adjustment– Automatic Straightening
• Rendering• Results• Conclusions
![Page 37: Automatic Panoramic Image Stitching using Local Features](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/37.jpg)
• 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](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/38.jpg)
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](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/39.jpg)
Bundle Adjustment
• Adjust rotation, focal length of each image to minimise error in matched features
![Page 40: Automatic Panoramic Image Stitching using Local Features](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/40.jpg)
Bundle Adjustment
• Adjust rotation, focal length of each image to minimise error in matched features
![Page 41: Automatic Panoramic Image Stitching using Local Features](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/41.jpg)
Automatic Stitching
• Feature Matching• Image Matching• Image Alignment
– Bundle Adjustment– Automatic Straightening
• Rendering• Results• Conclusions
![Page 42: Automatic Panoramic Image Stitching using Local Features](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/42.jpg)
Automatic Straightening
![Page 43: Automatic Panoramic Image Stitching using Local Features](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/43.jpg)
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](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/44.jpg)
Automatic Straightening
![Page 45: Automatic Panoramic Image Stitching using Local Features](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/45.jpg)
Automatic Stitching
• Feature Matching• Image Matching• Image Alignment• Rendering• Results• Conclusions
![Page 46: Automatic Panoramic Image Stitching using Local Features](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/46.jpg)
Gain Compensation
• No gain compensation
![Page 47: Automatic Panoramic Image Stitching using Local Features](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/47.jpg)
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](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/48.jpg)
Multi-band Blending
• No blending
![Page 49: Automatic Panoramic Image Stitching using Local Features](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/49.jpg)
Multi-band Blending
• Linear blending
– Each pixel is a weighted sum
![Page 50: Automatic Panoramic Image Stitching using Local Features](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/50.jpg)
Multi-band Blending
• Multi-band blending
– Each pixel is a weighted sum (for each band)
![Page 51: Automatic Panoramic Image Stitching using Local Features](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/51.jpg)
Multi-band Blending• Linear blending • Multi-band blending
[ Burt Adelson 1983 ]
![Page 52: Automatic Panoramic Image Stitching using Local Features](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/52.jpg)
2-band Blending
![Page 53: Automatic Panoramic Image Stitching using Local Features](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/53.jpg)
Low frequency ( > 2 pixels)
High frequency ( < 2 pixels)
2-band Blending
![Page 54: Automatic Panoramic Image Stitching using Local Features](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/54.jpg)
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](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/55.jpg)
Automatic Stitching
• Feature Matching• Image Matching• Image Alignment• Rendering• Results• Conclusions
![Page 56: Automatic Panoramic Image Stitching using Local Features](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/56.jpg)
Demo
![Page 57: Automatic Panoramic Image Stitching using Local Features](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/57.jpg)
Evaluation
• 200+ test sequences…
![Page 58: Automatic Panoramic Image Stitching using Local Features](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/58.jpg)
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](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/59.jpg)
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](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/60.jpg)
Results
• Testing performance (image scale)
• Tuning parameters (Huber sigma)
![Page 61: Automatic Panoramic Image Stitching using Local Features](https://reader036.fdocuments.us/reader036/viewer/2022062520/5681595d550346895dc69b2d/html5/thumbnails/61.jpg)
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