[go: up one dir, main page]

0% found this document useful (0 votes)
29 views24 pages

Scale Invariant Feature Transform (SIFT)

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 24

Scale Invariant Feature Transform

(SIFT)
Outline
What is SIFT
Algorithm overview
Object Detection
Summary
Overview
1999
Generates image features, keypoints
invariant to image scaling and rotation
partially invariant to change in illumination and 3D
camera viewpoint
many can be extracted from typical images
highly distinctive
Algorithm overview
Scale-space extrema detection
Uses difference-of-Gaussian function
Keypoint localization
Sub-pixel location and scale fit to a model
Orientation assignment
1 or more for each keypoint
Keypoint descriptor
Created from local image gradients
Scale space
Definition:
where
) , ( ) , , ( ) , , ( y x I y x G y x L - = o o
2 2 2
2 / ) (
2
2
1
) , , (
o
to
o
y x
e y x G
+
=
Scale space
Keypoints are detected using scale-space extrema in
difference-of-Gaussian function D
D definition:


Efficient to compute
) , ( )) , , ( ) , , ( ( ) , , ( y x I y x G k y x G y x D - = o o o
) , , ( ) , , ( o o y x L k y x L =
Relationship of D to
Close approximation to scale-normalized
Laplacian of Gaussian,
Diffusion equation:
Approximate G/:
giving,

When D has scales differing by a constant
factor it already incorporates the
2
scale
normalization required for scale-invariance
G
2 2
V o
G
G
2
V =
c
c
o
o
o o
o o
o

~
c
c
k
y x G k y x G G ) , , ( ) , , (
G k y x G k y x G
2 2
) 1 ( ) , , ( ) , , ( V ~ o o o
G
k
y x G k y x G
2
) , , ( ) , , (
V ~

o
o o
o o
G
2 2
V o
Scale space construction
2k
2

2k
2
k

2k
2
k

Scale space images

first octave


second octave


third octave

fourth octave


Difference-of-Gaussian images

first octave


second octave


third octave

fourth octave


Frequency of sampling
There is no minimum
Best frequency determined experimentally
Prior smoothing for each octave
Increasing increases robustness, but costs
= 1.6 a good tradeoff
Doubling the image initially increases number of
keypoints
Finding extrema
Sample point is selected only if it is a
minimum or a maximum of these points
DoG scale space
Extrema in this image
Localization
3D quadratic function is fit to the local sample
points
Start with Taylor expansion with sample point
as the origin
where
Take the derivative with respect to X, and set
it to 0, giving
is the location of the keypoint
This is a 3x3 linear system
X
X c
c
X + X
X c
c
+ = X
2
2
2
1
) (
D D
D D
T
T
T
y x ) , , ( o = X
X c
c
X c
c
= X

D D
2
1 2

X
X
D
X
D

0
2
2
c
c
+
c
c
=
Localization



Derivatives approximated by finite differences,
example:

If X is > 0.5 in any dimension, process
repeated
(
(
(
(
(
(

c
c
c
c
c
c
=
(
(
(

(
(
(
(
(
(
(

c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
x
D
y
D
D
x
y
x
D
yx
D
x
D
yx
D
y
D
y
D
x
D
y
D D
o o
o
o
o o o
2
2 2 2
2
2
2 2
2 2
2
2
4
) ( ) (
1
2
2
, 1
1
, 1
1
, 1
1
, 1
1
2
,
1
, ,
1
2
2
,
1
,
1
j i
k
j i
k
j i
k
j i
k
j i
k
j i
k
j i
k
j i
k
j i
k
D D D D
y
D
D D D D
D D D

+
+

+
+
+
+

=
c
c
+
=
c
c

=
c
c
o
o
o
Filtering
Contrast (use prev. equation):
If | D(X) | < 0.03, throw it out
Edge-iness:
Use ratio of principal curvatures to throw out poorly
defined peaks
Curvatures come from Hessian:
Ratio of Trace(H)
2
and Determinant(H)


If ratio > (r+1)
2
/(r), throw it out (SIFT uses r=10)
X
D
D D
T

2
1
)

(
X c
c
+ = X
(

=
yy xy
xy xx
D D
D D
H
2
) ( ) (
) (
xy yy xx
yy xx
D D D H Det
D D H Tr
=
+ =
Orientation assignment
Descriptor computed relative to keypoints
orientation achieves rotation invariance
Precomputed along with mag. for all levels
(useful in descriptor computation)


Multiple orientations assigned to keypoints
from an orientation histogram
Significantly improve stability of matching
))) , 1 ( ) , 1 ( /( )) 1 , ( ) 1 , ( (( 2 tan ) , (
)) 1 , ( ) 1 , ( ( )) , 1 ( ) , 1 ( ( ) , (
2 2
y x L y x L y x L y x L a y x
y x L y x L y x L y x L y x m
+ + =
+ + + =
u
Keypoint images
Descriptor
Descriptor has 3 dimensions (x,y,)
Orientation histogram of gradient magnitudes
Position and orientation of each gradient sample
rotated relative to keypoint orientation
Descriptor
Weight magnitude of each sample point by
Gaussian weighting function
Distribute each sample to adjacent bins by
trilinear interpolation (avoids boundary effects)
Descriptor
Best results achieved with 4x4x8 = 128
descriptor size
Normalize to unit length
Reduces effect of illumination change
Cap each element to 0.2, normalize again
Reduces non-linear illumination changes
0.2 determined experimentally
Object Detection
Create a database of
keypoints from
training images
Match keypoints to a
database
Nearest neighbor
search
PCA-SIFT
Different descriptor (same keypoints)
Apply PCA to the gradient patch
Descriptor size is 20 (instead of 128)
More robust, faster
Summary
Scale space
Difference-of-Gaussian
Localization
Filtering
Orientation assignment
Descriptor, 128 elements

You might also like