Feature Detection and Matching
簡韶逸 Shao-Yi Chien Department of Electrical Engineering National Taiwan University Fall 2019
1
Feature Detection and Matching Shao-Yi Chien Department of - - PowerPoint PPT Presentation
Feature Detection and Matching Shao-Yi Chien Department of Electrical Engineering National Taiwan University Fall 2019 1 References: Slides from Digital Visual Effects , Prof. Y.-Y. Chuang, CSIE, National Taiwan University
簡韶逸 Shao-Yi Chien Department of Electrical Engineering National Taiwan University Fall 2019
1
National Taiwan University
J.-B. Huang, Virginia Tech
and Prof. Rick Szeliski, U. Washington
2
3
4 Credit: Matt Brown
5
by Diva Sian by scgbt
6
more Like a Brain?” Nature Neuroscience, vol. 2, no. 11, 1999.
7
clutter (no prior segmentation)
large database of objects
small objects
8
9
10
11
12
Slide adapted from Darya Frolova, Denis Simakov, Weizmann Institute.
Local measure of feature uniqueness
13
Slide adapted from Darya Frolova, Denis Simakov, Weizmann Institute.
“flat” region: no change in all directions “edge”: no change along the edge direction “corner”: significant change in all directions
14 14
15
15
16
16
17
window function intensity shifted intensity 𝐹(𝑣, 𝑤) =
𝑦,𝑧
𝑥(𝑦, 𝑧) 𝐽 𝑦 + 𝑣, 𝑧 + 𝑤 − 𝐽(𝑦, 𝑧) 2
Auto-correlation function
18
E(u,v)
Strong Minimum Strong Ambiguity No Stable Minimum
19
𝐹 𝑣, 𝑤 =
𝑦,𝑧
𝑥 𝑦, 𝑧 𝐽 𝑦 + 𝑣, 𝑧 + 𝑤 − 𝐽 𝑦, 𝑧
2
=
𝑦,𝑧
𝑥 𝑦, 𝑧 𝐽 𝑦, 𝑧) + 𝛼𝐽(𝑦, 𝑧 ∙ (𝑣, 𝑤) − 𝐽 𝑦, 𝑧
2
=
𝑦,𝑧
𝑥 𝑦, 𝑧 𝐽𝑦(𝑦, 𝑧)𝑣 + 𝐽𝑧(𝑦, 𝑧)𝑤
2
=
𝑦,𝑧
𝑥 𝑦, 𝑧 𝐽𝑦
2 𝑦, 𝑧 𝑣2 + 𝐽𝑧 2 𝑦, 𝑧 𝑤2 + 2𝐽𝑦 𝑦, 𝑧 𝐽𝑧 𝑦, 𝑧 𝑣𝑤
20
, where M is a 22 matrix computed from image derivatives:
y x y y x y x x
, 2 2
𝑦,𝑧
2 𝑦, 𝑧 𝑣2 + 𝐽𝑧 2 𝑦, 𝑧 𝑤2 + 2𝐽𝑦 𝑦, 𝑧 𝐽𝑧 𝑦, 𝑧 𝑣𝑤
T T T T T T T T T
2 1 2 1
1 1q
2 2q
21
Intensity change in shifting window: eigenvalue analysis
direction of the slowest change direction of the fastest change
22
𝜇0 − 𝛽𝜇1
det 𝑁 trace 𝑁 = 𝜇0𝜇1 𝜇0 + 𝜇1
23
Ref: C. Harris and M.J. Stephens, “A combined corner and edge detector,” in Proc. Alvey Vision Conference, 1988.
Whole feature detection flow:
24
25
26
27
28
29
Ellipse rotates but its shape (i.e. eigenvalues) remains the same Corner response is invariant to image rotation
✓ Only derivatives are used => invariance to intensity shift I → I + b ✓ Intensity scale: I → a I R x (image coordinate)
threshold
R x (image coordinate) Partially invariant to affine intensity change
All points will be classified as edges Corner
Not invariant to scaling
s Original image
4 1
2 = s
Sampling with step s4 =2 s s s
) ( ) ( s s
yy xx
L L +
s s2 s3 s4 s5 List of
(x (x, y, , s) s)
2p
[Lowe, SIFT, 1999]
Basic idea:
Adapted from slide by David Lowe
2p angle histogram
Full version
Adapted from slide by David Lowe
[Lowe, ICCV 1999]
Histogram of oriented gradients
information
affine deformations
– Find maxima in location/scale space – Remove edge points
– Bin orientations into 36 bin histogram
– Return orientations within 0.8 of peak
– Sample 16x16 gradient mag. and rel. orientation – Bin 4x4 samples into 4x4 histograms – Threshold values to max of 0.2, divide by L2 norm – Final descriptor: 4x4x8 normalized histograms
Ref: D.G. Lowe, “Distinctive image features from scale-invariant keypoints,” International Journal of Computer Vision, 2004.
sift
868 SIFT features
43
Ref: Y. Ke and R. Sukthankar, “PCA-SIFT: a more distinctive representation for local image descriptors,” in Proc. CVPR2004.
44
Ref: K. Mikolajczyk and C. Schmid, “A performance evaluation of local descriptors,” IEEE Tran. Pattern Analysis and Machine Intelligence, 2005.
45
Ref: T. Tuytelaars H. Bay, A. Ess and L. V. Gool, “SURF: Speeded up robust features," in Proceedings
46
9x9 15x15
47
dx dy Σ dx Σ |dx| Σ dy Σ |dy|
How to define the difference between two features f1, f2?
48
How to define the difference between two features f1, f2?
49
'
50
51
𝑈𝑄𝑆 = 𝑈𝑄 𝑈𝑄 + 𝐺𝑂 = 𝑈𝑄 𝑄 𝐺𝑄𝑆 = 𝐺𝑄 𝐺𝑄 + 𝑈𝑂 = 𝐺𝑄 𝑂 𝑄𝑄𝑊 = 𝑈𝑄 𝑈𝑄 + 𝐺𝑄 = 𝑈𝑄 𝑄′ 𝐵𝐷𝐷 = 𝑈𝑄 + 𝑈𝑂 𝑄 + 𝑂
52
ROC curve (Receiver Operating Characteristic) True positive rate (TPR) False positive rate (FPR) Positive predictive value (PPV) Accuracy (ACC) 𝑈𝑄𝑆 = 𝑈𝑄 𝑈𝑄 + 𝐺𝑂 𝐺𝑄𝑆 = 𝐺𝑄 𝐺𝑄 + 𝑈𝑂 𝑄𝑄𝑊 = 𝑈𝑄 𝑈𝑄 + 𝐺𝑄 𝐵𝐷𝐷 = 𝑈𝑄 + 𝑈𝑂 𝑄 + 𝑂
53
54
55
at 𝐲 = (𝑣, 𝑤)⊤.
bitstring
56
57
pairs from training data
61
SIFT or SURF,” in Proc. 2011 International Conference on Computer Vision, Barcelona, 2011.
sixteen pixels around the corner candidate p.
the intensity of the candidate pixel Ip + t, or all darker than Ip - t.
62
1Rosten, Edward, and Tom Drummond. "Machine learning for high-speed corner detection." Computer Vision–ECCV 2006.
centroid, 𝑃𝐷.
63
maximum bin.
64
65
66
67
Media IC & System Lab Po-Chen Wu (吳柏辰)
68
Media IC & System Lab Po-Chen Wu (吳柏辰)
69
Media IC & System Lab Po-Chen Wu (吳柏辰)
70
Media IC & System Lab Po-Chen Wu (吳柏辰)
Intel i7 2.8 GHz Pascal 2009 dataset 2686 images at 5 scales
enabled
71
Media IC & System Lab Po-Chen Wu (吳柏辰)
72
Media IC & System Lab Po-Chen Wu (吳柏辰)
73
74
based image search," in Proc. CVPR 2011.
connected to strong edges
75
finalize edge detection
76
77
78
= 𝑢𝑏𝑜−1𝑜𝑧/𝑜𝑦, compute the value of 𝑒 = 𝑦𝑜𝑦 + 𝑧𝑜𝑧 and increment the accumulator corresponding to (𝜄, 𝑒)
79
80
82
“Discriminative learning of deep convolutional feature point descriptors,” in Proc. ICCV 2015. Loss function:
83
“Discriminative learning of deep convolutional feature point descriptors,” in Proc. ICCV 2015.
84
85
86
87
MPEG-7 enabled systems
88
89
90
1 =
i i
p
91
Field Number of Bits Meaning NumberofColors 3 Specifies number of dominant colors SpatialCoherency 5 Spatial Coherency Value Percentage[] 5 Normalized percentage associated with each dominant color ColorVariance[][] 1 Color variance of each dominant color Index[][] 1—12 Dominant color values
92
space (Lloyd algorithm)
− =
n i i i
C n x c n x n h D ) ( , ) ( ) (
2
i i
C n x n h n x n h c =
) ( , ) ( ) ( ) (
93
all pixels and one representative color computed as the centroid of the cluster
calculation and clustering steps until a stopping criterion (minimum distortion or maximum number of iterations)
94
connected pixels of each dominant color
31 means highest confidence 1 means no confidence 0 means not computed
i i
p
95
search the database for each of the representative color separately, then combine.
96
dk,l:
colors
distance Euclidean the is
, l k l k
c c d − =
d
T d =
max
97
w1 = 0.3, w2 = 0.7 (recommanded)
98
99
30 2 1 30 2 1
SD DC
62 numbers (496 bits) Channels used in computing the HTD Texture feature channels modeled using the Gabor functions in the polar frequency domain
30 2 1 30 2 1
SD DC
2 1 360 ) ( , 10
+ +
= =
r s i i i
104
Chen-han Tsai 105
Chen-han Tsai 106
Chen-han Tsai 107
Chen-han Tsai 108
Chen-han Tsai 109
F: image function V: ART basis Define on unit circle in polar system
Chen-han Tsai 110
ART basis Real part
Chen-han Tsai 111
ART basis Imaginary part
Chen-han Tsai 112
Angular (m):0~11 Radial (n) :0~2 Normalize by F00: Fnm /F00 n=0~2,m=0~11
Chen-han Tsai 113
Chen-han Tsai 114
Chen-han Tsai 115
116