Lecture7 DoG SIFT Cs131
Lecture7 DoG SIFT Cs131
Lecture7 DoG SIFT Cs131
7:
Finding
Features
(part
2/2)
• Keypoint
localizaHon
– Harris
corner
detector
• Scale
invariant
region
selecHon
– AutomaHc
scale
selecHon
– Difference-‐of-‐Gaussian
(DoG)
detector
• SIFT:
an
image
region
descriptor
Some
background
reading:
David
Lowe,
IJCV
2004
• Fast
approximaHon
– Avoid
compuHng
the
eigenvalues
– α:
constant
“Flat”
“Edge”
(0.04
to
0.06)
region
θ<0
λ1
Fei-Fei Li! Lecture 7 - !5
2-‐Oct-‐14
Quick
review:
Harris
Corner
Detector
• TranslaHon
invariance
• RotaHon
invariance
• Scale
invariance?
f Image 1 f Image 2
scale = 1/2
L = σ 2 (Gxx ( x, y, σ ) + Gyy ( x, y, σ ) )
(Laplacian)
DoG = G( x, y, kσ ) − G( x, y, σ )
(Difference of Gaussians)
where Gaussian
x2 + y 2
− Note: both kernels are invariant
2σ 2
G ( x, y , σ ) = 1
2πσ
e to scale and rotation
scale scale
From
Lindeberg
1998
blob detecHon; Marr 1982; Voorhees and Poggio 1987; Blostein and Ahuja 1989; …
← Laplacian →
Find
local
maximum
of:
– Harris
corner
detector
in
y
space
(image
coordinates)
– Laplacian
in
scale
← Harris → x
• SIFT
(Lowe)2
scale
Find
local
maximum
of:
– Difference
of
Gaussians
in
space
← DoG →
and
scale
y
← DoG → x
1
K.Mikolajczyk,
C.Schmid.
“Indexing
Based
on
Scale
Invariant
Interest
Points”.
ICCV
2001
2
D.Lowe.
“DisHncHve
Image
Features
from
Scale-‐Invariant
Keypoints”.
IJCV
2004
Repeatability rate:
# correspondences
# possible correspondences
K.Mikolajczyk, C.Schmid. “Indexing Based on Scale Invariant Interest Points”. ICCV 2001
22
Lecture 7 - ! 2-‐Oct-‐14
Advantages
of
invariant
local
features
• Locality:
features
are
local,
so
robust
to
occlusion
and
cluoer
(no
prior
segmentaHon)
• Dis5nc5veness:
individual
features
can
be
matched
to
a
large
database
of
objects
• Quan5ty:
many
features
can
be
generated
for
even
small
objects
• Efficiency:
close
to
real-‐Hme
performance
• Extensibility:
can
easily
be
extended
to
wide
range
of
differing
feature
types,
with
each
adding
robustness
Blur
Subtract
Lecture 7 - ! 2-‐Oct-‐14
Becoming
rotaHon
invariant
• We
are
given
a
keypoint
and
its
scale
from
DoG
• We
will
select
a
characterisHc
orientaHon
for
the
keypoint
(based
on
the
most
prominent
gradient
there;
discussed
next
slide)
• We
will
describe
all
features
rela5ve
to
this
orientaHon
• Causes
features
to
be
rotaHon
invariant!
– If
the
keypoint
appears
rotated
in
another
image,
the
features
will
be
the
same,
because
they’re
rela5ve
to
the
characterisHc
orientaHon
0 2π
David
G.
Lowe,
"DisHncHve
image
features
from
scale-‐invariant
keypoints,"
InternaHonal
Journal
of
Computer
Vision,
60,
2
(2004),
pp.
91-‐110
• Using
precise
gradient
locaHons
is
fragile.
We’d
like
to
allow
some
“slop”
in
the
image,
and
sHll
produce
a
very
similar
descriptor
• Create
array
of
orientaHon
histograms
(a
4x4
array
is
shown)
• Put
the
rotated
gradients
into
their
local
orientaHon
histograms
– A
gradients’s
contribuHon
is
divided
among
the
nearby
histograms
based
on
distance.
If
it’s
halfway
between
two
histogram
locaHons,
it
gives
a
half
contribuHon
to
both.
– Also,
scale
down
gradient
contribuHons
for
gradients
far
from
the
center
• The
SIFT
authors
found
that
best
results
were
with
8
orientaHon
bins
per
histogram,
and
a
4x4
histogram
array.
David
G.
Lowe,
"DisHncHve
image
features
from
scale-‐invariant
keypoints,"
InternaHonal
Journal
of
Computer
Vision,
60,
2
(2004),
pp.
91-‐110
hop://www.cs.ubc.ca/~mbrown/autosHtch/autosHtch.html
Fei-Fei Li! Lecture 7 - !
Wide
baseline
stereo
• Keypoint
localizaHon
– Harris
corner
detector
• Scale
invariant
region
selecHon
– AutomaHc
scale
selecHon
today
(#7)
– Difference-‐of-‐Gaussian
(DoG)
detector
• SIFT:
an
image
region
descriptor
Some
background
reading:
R.
Szeliski,
Ch
14.1.1;
David
Lowe,
IJCV
2004