Professional Documents
Culture Documents
Detectors and Descriptors
Detectors and Descriptors
10
Detectors
and
descriptors
•
Properties
of
detectors
• Edge
detectors
• Harris
• DoG
• Properties
of
descriptors
• SIFT
• HOG
• Shape
context
P = [x,y,z]
p = [x,y]
3D world
Feature
e.g. DoG
Detection
• Estimation
• Matching
• Indexing
• Detection
Estimation
H
Estimation
Matching
Image 1 Image 2
Object modeling and detection
A
Lecture
10
Detectors
and
descriptors
•
Properties
of
detectors
• Edge
detectors
• Harris
• DoG
• Properties
of
descriptors
• SIFT
• HOG
• Shape
context
• Depth discontinuity
• Surface orientation
discontinuity
• Reflectance
discontinuity (i.e.,
change in surface
material properties)
• Illumination
discontinuity (e.g.,
highlights; shadows)
Edge Detection
• Criteria for optimal edge detection (Canny 86):
– Good detection accuracy:
• minimize the probability of false positives (detecting spurious
edges caused by noise),
• false negatives (missing real edges)
– Good localization:
• edges must be detected as close as possible to the true edges.
True
edge Poor robustness Poor Too many
to noise localization responses
Designing an edge detector
• Two ingredients:
f*g
d
( f ∗ g)
dx
[Eq. 1]
dg
= ∗ f = “derivative of Gaussian” filter
[Eq. 2] dx Source: S. Seitz
Edge detector in 2D
• Smoothing
x2 +y2
1 −
•Derivative & ∂g #
$ ∂x ! & g x #
S = ∇(g ∗ I ) = (∇g )∗ I = ∇g = $ ∂g ! = $ !
$ ! %g y "
$% ∂y !"
[Eq. 6]
'g x $ &gx ∗ I # !
= % "∗I = $ ! = " Sx Sy #$ = gradient vector
&g y # %g y ∗ I " [Eq. 5]
Canny Edge Detection (Canny 86):
See CS131A for details
Scale
invariance
Pose invariance
•Rotation
•Affine
• Saliency ☺
☹
☺
☹
•Locality
Corners detectors
Harris corner detector
C.Harris and M.Stephens. "A Combined Corner and Edge Detector.“ Proceedings of the 4th
Alvey Vision Conference: pages 147--151.
See CS131A for details
Harris Detector: Basic Idea
Explore intensity changes within a window
as the window changes location
f*g
d
( f ∗ g)
dx
Source: S. Seitz
Edge detection
f*g
[Eq. 7]
d2
( f ∗ g)
dx 2
d2
[Eq. 8] f ∗ 2 g = “second derivative of Gaussian” filter = Laplacian of the gaussian
dx
Edge detection as zero crossing
Edge
f
d2 Laplacian
2
g
dx
edge edge
From edges to blobs
• Can we use the laplacian to find a blob (RECT function)?
* * *
= = =
maximum
Magnitude of the Laplacian response achieves a maximum at the center of the blob,
provided the scale of the Laplacian is “matched” to the scale of the blob
From edges to blobs
• Can we use the laplacian to find a blob (RECT function)?
* * *
= = =
maximum
increasing σ
Scale normalization
• To keep the energy of the response the same,
must multiply Gaussian derivative by σ
Normalized
Laplacian
1 −
x2
2σ 2 2d2
g(x) = e σ 2
g
2π σ dx
Characteristic scale
We define the characteristic scale as the scale that produces peak of
Laplacian response
Maximum ☺
T. Lindeberg (1998). "Feature detection with automatic scale selection." International Journal of Computer Vision 30 (2): pp 77--116.
Characteristic scale
Here is what happens if we don’t normalize the Laplacian:
Original
signal σ=1 σ=2 σ=4 σ=8 σ = 16
This should
give the max
response ☹
Blob detection in 2D
• Laplacian of Gaussian: Circularly symmetric
operator for blob detection in 2D
[Eq. 9] 2 2
2 2 &∂ g ∂ g #
Scale-normalized: ∇ norm g = σ $$ 2 + 2 !!
% ∂x ∂y "
Scale selection
• For a binary circle of radius r, the Laplacian
achieves a maximum at
σ =r/ 2
Laplacian response
r/ 2 scale (σ)
image
Scale-space blob detector
1. Convolve image with scale-normalized
Laplacian at several scales
L = σ 2 (Gxx ( x, y, σ ) + G yy ( x, y, σ ) )
(Laplacian) [Eq. 10]
In general:
2
DoG = G(x, y,kσ ) − G(x, y,σ ) ≈ (k −1)σ L [Eq. 12]
Affine invariant detectors
K. Mikolajczyk and C. Schmid, Scale and Affine invariant interest point detectors,
IJCV 60(1):63-86, 2004.
2 2
2 2 & ∂ g ∂ g#
Scale-normalized: ∇ norm g = σ $$ 2 + 2 !!
% ∂x ∂y "
Properties of detectors
Detector Illumination Rotation Scale View
point
Lowe ’99 Yes Yes Yes No
(DoG)
Feature
e.g. DoG
Detection
• Estimation
• Matching
• Indexing
• Detection
Properties
Depending on the application a descriptor must
incorporate information that is:
• Invariant w.r.t:
a
•Illumination
•Pose
•Scale
•Intraclass variability
A
• Highly distinctive (allows a single feature to find its correct match
with good probability in a large database of features)
The simplest descriptor
Index of w
Why can’t we just use this?
• Poorly distinctive
Sensitive to pose variations
NCC
Normalized Correlation:
( w − w )( w ! − w !)
w n ⋅ w !n =
( w − w )( w ! − w !)
u
Properties of descriptors
Descriptor Illumination Pose Intra-class
variab.
* =
filter responses
descriptor
More robust but still quite
sensitive to pose variations
http://people.csail.mit.edu/billf/papers/steerpaper91FreemanAdelson.pdf
A. Oliva and A. Torralba. Modeling the shape of the scene: a holistic representation of the spatial envelope. IJCV, 2001.
Properties of descriptors
Descriptor Illumination Pose Intra-class
variab.
Image window
SIFT descriptor
θ1 θ2 θM-1 θM
SIFT descriptor
0 2 π
A
3
1
0 0
//
1 2 3 4 5 10 11 12 13 14 ….
Bin #
13th
Shape context descriptor
Courtesy of S. Belongie and J. Malik