Automatic Panoramic Image Stitching
- Dr. Matthew Brown,
University of Bath
Automatic Panoramic Image Stitching Dr. Matthew Brown, University - - PowerPoint PPT Presentation
Automatic Panoramic Image Stitching Dr. Matthew Brown, University of Bath AutoStitch iPhone Create gorgeous panoramic photos on your iPhone - Cult of Mac Raises the bar on iPhone panoramas - TUAW Magically combines the
Automatic Panoramic Image Stitching
University of Bath
AutoStitch iPhone
3
“Raises the bar on iPhone panoramas”
“Magically combines the resulting shots”
“Create gorgeous panoramic photos on your iPhone”
4F12 class of ‘99
4
Projection 37Case study – Image mosaicing
Any two images of a general scene with the same camera centre are related by a planar projective transformation given by: ˜ w = KRK−1 ˜ w where K represents the camera calibration matrix and R is the rotation between the views. This projective transformation is also known as the homography induced by the plane at infinity. A min- imum of four image correspondences can be used to estimate the homography and to warp the images
saicing.
Local Feature Matching
...compute a description of that point that can be easily found in other images
6
Scale Invariant Feature Transform
L(I(x)) = r.rI = ∂2I ∂x2 + ∂2I ∂y2
7
[ T. Lindeberg ]
Scale Invariant Feature Transform
8
Scale Invariant Feature Transform
9
[ A. Vedaldi ]
Feature Matching
10
?
[ A. Vedaldi ]
Feature Matching
11
exist
dimensions
nearby branches of the tree
8j NN(j) = arg min
i
||xi xj||, i 6= j
2-view Rotational Geometry
geometry of the setup
12
2-view Rotational Geometry
13
˜ u = K | R | t | ˜ X ˜ X ∼ [X, Y, Z, 1]T ˜ u ∼ [u, v, 1]T K (3 × 3)
: Homogeneous image position : Homogeneous world coordinates : Intrinsic (calibration) matrix
R (3 × 3)
: Rotation matrix
t (3 × 1)
: Translation vector
2-view Rotational Geometry
14
˜ u1 = K1[ R1 | t1 ] ˜ X
˜ u1 = K1[ R1 | 0 ] ˜ X
X ∼ [X, Y, Z, 1]T so
˜ u1 = K1R1X
X = [X, Y, Z]T
(where )
2-view Rotational Geometry
and intrinsic matrix)
15
˜ u2 = K2R2X ˜ u1 = K1R1X
X = RT
1 K−1 1 ˜
u1
˜ u2 = K2R2RT
1 K−1 1 ˜
u1
This is a 3x3 matrix -- a (special form) of homography
Computing H: Quiz
equations
homography
form
16
s u v 1 = h11 h12 h13 h21 h22 h23 h31 h32 h33 x y 1
Mh = 0
Finding Consistent Matches
17
Finding Consistent Matches
18
Finding Consistent Matches
19
RANSAC
despite noisy correspondences
used to compute H
number of inliers to the transformation
20
RANSAC
21
H = eye(3,3); nBest = 0; for (int i = 0; i < nIterations; i++) { P4 = SelectRandomSubset(P); Hi = ComputeHomography(P4); nInliers = ComputeInliers(Hi); if (nInliers > nBest) { H = Hi; nBest = nInliers; } }
[ Brown, Lowe ICCV’03 ]
22
Recognising Panoramas
Global Alignment
errors
23
Gap Closing
24
Bundle Adjustment
25
uij mij
Bundle Adjustment
e(Θ) =
np
X
i=1
X
jV(i)
f(uij(Θ) − mij) f(x) = ( |x|2, |x| < σ 2σ|x| − σ2, |x| ≥ σ
np
V(i)
Θ
26