Image Stitching
Ali Farhadi CSE 576
Several slides from Rick Szeliski, Steve Seitz, Derek Hoiem, and Ira Kemelmacher
Image Stitching Ali Farhadi CSE 576 Several slides from Rick - - PowerPoint PPT Presentation
Image Stitching Ali Farhadi CSE 576 Several slides from Rick Szeliski, Steve Seitz, Derek Hoiem, and Ira Kemelmacher Combine two or more overlapping images to make one larger image Add example Slide credit: Vaibhav Vaish How to do it?
Several slides from Rick Szeliski, Steve Seitz, Derek Hoiem, and Ira Kemelmacher
Add example Slide credit: Vaibhav Vaish
Let’s assume we are given a set of good matching interest points
mosaic PP
Camera Center
translation rotation aspect affine perspective
f(x) g(x’) x x’ h(x)
f(x) g(x’) x x’ h(x)
f(x) g(x’) x x’ h(x)
Image Stitching Richard Szeliski 21
f(x) g(x’) x x’ h-1(x)
Image Stitching Richard Szeliski 22
f(x) g(x’) x x’ h-1(x)
Translation 2 unknowns Affine 6 unknowns Perspective 8 unknowns
How do we solve for ?
Mean displacement =
Displacement of match i =
– What are the knowns? Unknowns? – How many unknowns? How many equations (per match)?
– “Overdetermined” system of equations – We will find the least squares solution
Defines a least squares problem:
eigenvalue
2n × 9 9 2n
Image Stitching Richard Szeliski 40
What do we do about the “bad” matches?
Image Stitching Richard Szeliski 41
Select one match, count inliers
Image Stitching Richard Szeliski 42
Select one match, count inliers
Image Stitching Richard Szeliski 43
Find “average” translation vector
Structure from Motion
CSE 576, Spring 2008 45
46
47
47
48
3 inliers
48
49
4 inliers
49
50
9 inliers
50
51
8 inliers
51
52
Red: rejected by 2nd nearest neighbor criterion Blue: Ransac outliers Yellow: inliers
a) Translate for zero mean b) Scale so that average distance to origin is ~sqrt(2) – This makes problem better behaved numerically
1 −
i i
HZ Tutorial ‘99
i i
1 1
1
left right
1
1 1
1
“Optimal” window: smooth but not ghosted
Create a Laplacian pyramid, blend each level
Graphics, 42(4), October 1983, 217-236.
1
2
n
1
2
n n
1 +
i i i
1 +
i i i
Laplacian level 4 Laplacian level 2 Laplacian level left pyramid right pyramid blended pyramid
1 1 1 Left pyramid Right pyramid blend
Laplacian pyramids
– http://research.microsoft.com/vision/cambridge/papers/perez_siggraph03.pdf
Encoding blend weights: I(x,y) = (αR, αG, αB, α) color at p = Implement this in two steps:
Optional: see Blinn (CGA, 1994) for details:
http://ieeexplore.ieee.org/iel1/38/7531/00310740.pdf? isNumber=7531&prod=JNL&arnumber=310740&arSt=83&ared= 87&arAuthor=Blinn%2C+J.F.
I1 I2 I3 p
Image 1 Image 2 x x im1 im2
Image 1 Image 2 x x im1 im2
Illustration: http://en.wikipedia.org/wiki/File:Rochester_NY .jp
Brown and Lowe 2003, 2007
Some of following material from Brown and Lowe 2003 talk
# inliers # keypoints in