Feature Extraction: Corners and Blobs
Feature Extraction: Corners and Blobs
• Repeatability
• The same feature can be found in several images despite geometric
and photometric transformations
• Saliency
• Each feature has a distinctive description
• Compactness and efficiency
• Many fewer features than image pixels
• Locality
• A feature occupies a relatively small area of the image; robust to
clutter and occlusion
Applications
Feature points are used for:
• Motion tracking
• Image alignment
• 3D reconstruction
• Object recognition
• Indexing and database retrieval
• Robot navigation
Finding Corners
E (u , v) w( x, y ) I ( x u , y v) I ( x, y )
2
x, y
Source: R. Szeliski
Harris Detector: Mathematics
E (u , v) w( x, y ) I ( x u , y v) I ( x, y )
2
x, y
u
E (u , v) [u v] M
v
I x2 IxI y
M w( x, y ) 2
x, y I x I y I y
M
Interpreting the second moment matrix
I x2 I I x y
1 0
M
I x I y I 0 2
2
y
1
Corner response function
R det( M ) trace( M ) 2 12 (1 2 ) 2
α: constant (0.04 to 0.06)
“Edge”
R<0 “Corner”
R>0
|R| small
“Flat” “Edge”
region R<0
Harris Detector: Steps
Harris Detector: Steps
Compute corner response R
Harris Detector: Steps
Find points with large corner response: R>threshold
Harris Detector: Steps
Take only the points of local maxima of R
Harris Detector: Steps
Harris detector: Summary of steps
Geometric
• Rotation
• Scale
• Affine
valid for: orthographic camera, locally planar object
Photometric
• Affine intensity change (I a I + b)
Harris Detector: Invariance Properties
Rotation
R R
threshold
Corner
Edge
f
d Derivative
g of Gaussian
dx
d Edge = maximum
f g of derivative
dx
Source: S. Seitz
Edge detection, Take 2
Edge
f
2 Second derivative
d of Gaussian
2
g
dx (Laplacian)
Source: S. Seitz
From edges to blobs
• Edge = ripple
• Blob = superposition of two ripples
maximum
1
2
Scale normalization
• The response of a derivative of Gaussian
filter to a perfect step edge decreases as σ
increases
• To keep response the same (scale-invariant),
must multiply Gaussian derivative by σ
• Laplacian is the second Gaussian derivative,
so it must be multiplied by σ2
Effect of scale normalization
Original signal Unnormalized Laplacian response
maximum
Blob detection in 2D
Laplacian of Gaussian: Circularly symmetric
operator for blob detection in 2D
2 2
2 g g
g 2 2
x y
Blob detection in 2D
Laplacian of Gaussian: Circularly symmetric
operator for blob detection in 2D
g g
2 2
Scale-normalized: 2
norm g 2 2
2
x y
Scale selection
• The 2D Laplacian is given by
( x 2 y 2 ) / 2 2
( x y 2 ) e
2 2 2
(up to scale)
Laplacian response
r/ 2 scale (σ)
image
Characteristic scale
• We define the characteristic scale as the
scale that produces peak of Laplacian
response
characteristic scale
T. Lindeberg (1998). "Feature detection with automatic scale selection."
International Journal of Computer Vision 30 (2): pp 77--116.
Scale-space blob detector
1. Convolve image with scale-normalized
Laplacian at several scales
2. Find maxima of squared Laplacian response
in scale-space
Scale-space blob detector: Example
Scale-space blob detector: Example
Scale-space blob detector: Example
Efficient implementation
Approximating the Laplacian with a difference of
Gaussians:
L 2 Gxx ( x, y, ) G yy ( x, y, )
(Laplacian)
DoG G ( x, y, k ) G ( x, y, )
(Difference of Gaussians)
Efficient implementation
0 2
Affine adaptation
• Problem: the second moment “window”
determined by weights w(x,y) must match the
characteristic shape of the region
• Solution: iterative approach
• Use a circular window to compute second moment matrix
• Perform affine adaptation to find an ellipse-shaped window
• Recompute second moment matrix using new window and
iterate
Iterative affine adaptation
Affine-adapted blobs
Summary: Feature extraction
Covariance:
• features(transform(image)) = transform(features(image))
http://www.cs.unc.edu/~lazebnik/spring08/assignment1.html
Next time: Fitting