Image alignment
Image source Slides from Derek Hoiem, Svetlana Lazebnik
Image alignment Slides from Derek Hoiem, Svetlana Lazebnik Image - - PowerPoint PPT Presentation
Image alignment Slides from Derek Hoiem, Svetlana Lazebnik Image source Alignment applications A look into the past Alignment applications A look into the past Alignment applications Cool video Alignment applications Instance
Image source Slides from Derek Hoiem, Svetlana Lazebnik
Instance recognition
A large-scale evaluation, CVIU 2015
Small degree of overlap Occlusion, clutter, viewpoint change Intensity changes
Slide from L. Lazebnik.
Slide from L. Lazebnik.
Slide from L. Lazebnik.
Slide from L. Lazebnik.
Slide from L. Lazebnik.
with T)
Slide from L. Lazebnik.
?
Slide from L. Lazebnik.
surrounding interest points
?
feature descriptor feature descriptor
?
Slide from L. Lazebnik.
Slide from L. Lazebnik.
– Not invariant to intensity change
– Invariant to affine intensity change
( )
i i i
v u
2
) SSD( v u,
÷ ÷ ø ö ç ç è æ
÷ ø ö ç ç è æ
j j j j i i i
v u v u
2 2
) ( ) ( ) )( ( || || ) ( || || ) ( ) ( v u v u v v v v u u u u v u, r
Slide from L. Lazebnik.
score a lot
Slide from L. Lazebnik.
angles) inside each sub-patch
David G. Lowe. "Distinctive image features from scale-invariant keypoints.” IJCV 60 (2), pp. 91-110, 2004.
Slide from L. Lazebnik.
angles) inside each sub-patch
robustness to small shifts, but still preserves some spatial information
David G. Lowe. "Distinctive image features from scale-invariant keypoints.” IJCV 60 (2), pp. 91-110, 2004.
Slide from L. Lazebnik.
image, find a short list of patches in the other image that could match it based solely on appearance
Slide from L. Lazebnik.
Source: Y. Furukawa
second nearest neighbor
for features that are not distinctive
David G. Lowe. "Distinctive image features from scale-invariant keypoints.” IJCV 60 (2), pp. 91-110, 2004.
Threshold of 0.8 provides good separation
Slide from L. Lazebnik.
percentage of outliers RANSAC loop: 1. Randomly select a seed group of matches 2. Compute transformation from seed group 3. Find inliers to this transformation 4. If the number of inliers is sufficiently large, re-compute least-squares estimate of transformation on all of the inliers Keep the transformation with the largest number of inliers
Slide from L. Lazebnik.
with T)
Slide from L. Lazebnik.
Camera Center
Slide from A. Efros, S. Seitz, D. Hoiem
translation rotation aspect affine perspective
Transformed
Slide from A. Efros, S. Seitz, D. Hoiem
Scaling a coordinate means multiplying each of its components by a scalar Uniform scaling means this scalar is the same for all components:
´ 2
Slide from A. Efros, S. Seitz, D. Hoiem
Non-uniform scaling: different scalars per component:
X ´ 2, Y ´ 0.5
Slide from A. Efros, S. Seitz, D. Hoiem
Scaling operation: Or, in matrix form:
scaling matrix S
Slide from A. Efros, S. Seitz, D. Hoiem
Slide from A. Efros, S. Seitz, D. Hoiem
Polar coordinates… x = r cos (f) y = r sin (f) x’ = r cos (f + q) y’ = r sin (f + q) Trig Identity… x’ = r cos(f) cos(q) – r sin(f) sin(q) y’ = r sin(f) cos(q) + r cos(f) sin(q) Substitute… x’ = x cos(q) - y sin(q) y’ = x sin(q) + y cos(q)
Slide from A. Efros, S. Seitz, D. Hoiem
This is easy to capture in matrix form: Even though sin(q) and cos(q) are nonlinear functions of q,
What is the inverse transformation?
T
R R =
R
Slide from A. Efros, S. Seitz, D. Hoiem
Translate Rotate Shear Scale
ú û ù ê ë é ú û ù ê ë é = ú û ù ê ë é y x y x
y x
1 1 ' ' a a
ú û ù ê ë é ú û ù ê ë é Q Q Q
= ú û ù ê ë é y x y x cos sin sin cos ' '
ú û ù ê ë é ú û ù ê ë é = ú û ù ê ë é y x s s y x
y x
' '
ú ú ú û ù ê ê ê ë é ú û ù ê ë é = ú û ù ê ë é ¢ ¢ 1 1 1 y x t t y x
y x
ú ú ú û ù ê ê ê ë é ú û ù ê ë é = ú û ù ê ë é ¢ ¢ 1 y x f e d c b a y x
Affine Affine is any combination of translation, scale, rotation, shear
Slide from A. Efros, S. Seitz, D. Hoiem
Affine transformations are combinations of
Properties of affine transformations:
ú ú ú û ù ê ê ê ë é ú û ù ê ë é = ú û ù ê ë é ¢ ¢ 1 y x f e d c b a y x
ú ú ú û ù ê ê ê ë é ú ú ú û ù ê ê ê ë é = ú ú ú û ù ê ê ê ë é 1 1 1 ' ' y x f e d c b a y x
Slide from L. Lazebnik.
ú ú û ù ê ê ë é ú ú û ù ê ê ë é = ú ú û ù ê ê ë é w y x i h g f e d c b a w y x ' ' '
Projective transformations are combos of
Properties of projective transformations:
Slide from L. Lazebnik.
Slide from R. Szeliski
get the transformation?
) , (
i i y
x ¢ ¢ ) , (
i i y
x
ú û ù ê ë é + ú û ù ê ë é ú û ù ê ë é = ú û ù ê ë é ¢ ¢
2 1 4 3 2 1
t t y x m m m m y x
i i i i
i i
Want to find M, t to minimize
=
n i i i 1 2
Slide from L. Lazebnik.
get the transformation?
) , (
i i y
x ¢ ¢ ) , (
i i y
x
ú û ù ê ë é + ú û ù ê ë é ú û ù ê ë é = ú û ù ê ë é ¢ ¢
2 1 4 3 2 1
t t y x m m m m y x
i i i i
ú ú ú ú û ù ê ê ê ê ë é ¢ ¢ = ú ú ú ú ú ú ú ú û ù ê ê ê ê ê ê ê ê ë é ú ú ú ú û ù ê ê ê ê ë é ! ! ! !
i i i i i i
y x t t m m m m y x y x
2 1 4 3 2 1
1 1
Slide from L. Lazebnik.
equations: need at least three to solve for the transformation parameters
ú ú ú ú û ù ê ê ê ê ë é ¢ ¢ = ú ú ú ú ú ú ú ú û ù ê ê ê ê ê ê ê ê ë é ú ú ú ú û ù ê ê ê ê ë é ! ! ! !
i i i i i i
y x t t m m m m y x y x
2 1 4 3 2 1
1 1
Slide from L. Lazebnik.
Converting to homogeneous image coordinates Converting from homogeneous image coordinates
Slide from L. Lazebnik.
Converting to homogeneous image coordinates Converting from homogeneous image coordinates
33 32 31 23 22 21 13 12 11
Slide from L. Lazebnik.
i i
ú ú ú û ù ê ê ê ë é ú ú ú û ù ê ê ê ë é = ú ú ú û ù ê ê ê ë é ¢ ¢ 1 1
33 32 31 23 22 21 13 12 11 i i i i
y x h h h h h h h h h y x l
i i
ú ú ú û ù ê ê ê ë é ¢
¢
= ú ú ú û ù ê ê ê ë é ´ ú ú ú û ù ê ê ê ë é ¢ ¢
i T i i T i i T i i T i T i T i i T i T i T i i
y x x y y x x h x h x h x h x h x h x h x h x h
3 2 1 1 2 3 1 2 3
1
3 2 1
= ÷ ÷ ÷ ø ö ç ç ç è æ ú ú ú û ù ê ê ê ë é ¢ ¢
h h x x x x x x
T T i i T i i T i i T T i T i i T i T
x y x y
3 equations,
independent
Slide from L. Lazebnik.
arbitrary)
3 2 1 1 1 1 1 1 1
T n n T T n T n n T n T T T T T T T
Slide from L. Lazebnik.
Slide from L. Lazebnik