文章目录
备注Feature Detection and Matching1. Advantages of Local Features2. Points and PatchesCorner DetectionSIFTSIFT DetectorSIFT Describor
备注
图像理解是中国科学技术大学的研究生课程,使用的教材是Richard Szeliski的殿堂级著作"Computer Vision: Algorithms and Applications"。
Feature Detection and Matching
1. Advantages of Local Features
Locality features are local, so robust to occlusion and clutter. 对遮掩的鲁棒性好。Distinctiveness(特殊性) can differentiate a large database of objects. 区分度高。Quantity hundreds or thousands in a single image.Efficiency real-time performance achievable.Generality exploit different types of features in different situations.
2. Points and Patches
Corner Detection
Basic idea: Find points where two edges meet —i.e., high gradient in two directions.“Cornerness” is undefined at a single pixel, because there’s only one gradient per point. —Look at the gradient behavior over a small window.Categories image windows based on gradient statistics —Constant: Little or no brightness change —Edge: Strong brightness change in single direction —Flow: Parallel stripes —Corner/spot: Strong brightness changes in orthogonal directionsAuto-correlation Function(自相关函数)
E
A
C
(
Δ
u
)
=
∑
i
w
(
x
i
)
[
I
0
[
x
i
+
Δ
u
]
−
I
0
(
x
i
)
]
2
E_{AC}(\Delta u)=\sum_{i}w(x_i)[I_0[x_i+\Delta u]-I_0(x_i)]^2
EAC(Δu)=∑iw(xi)[I0[xi+Δu]−I0(xi)]2 其中
w
(
x
i
)
w(x_i)
w(xi)为窗函数,
I
0
[
x
i
+
Δ
u
]
I_0[x_i+\Delta u]
I0[xi+Δu]为移动后图像,
I
0
(
x
i
)
I_0(x_i)
I0(xi)为原图。
先针对单个点,即对
[
I
0
[
x
i
+
Δ
u
]
−
I
0
(
x
i
)
]
2
[I_0[x_i+\Delta u]-I_0(x_i)]^2
[I0[xi+Δu]−I0(xi)]2 进行分析,通过泰勒展开,有
[
[
I
x
I
y
]
[
u
v
]
]
2
\begin{bmatrix}{\begin{bmatrix} I_x & I_y \end{bmatrix}}&{\begin{bmatrix} u \\ v \end{bmatrix}}\end{bmatrix}^2
[[IxIy][uv]]2
=
[
u
v
]
[
I
x
2
I
x
I
y
I
x
I
y
I
y
2
]
[
u
v
]
=\begin{bmatrix} u & v \end{bmatrix}\begin{bmatrix} I_x ^2 & I_xI_y \\ I_xI_y & I_y^2 \end{bmatrix}\begin{bmatrix} u \\ v \end{bmatrix}
=[uv][Ix2IxIyIxIyIy2][uv]因为统计对于某一点,统计一块儿区域有意义,所以添加窗函数,
E
A
C
(
Δ
u
)
=
∑
i
w
(
x
i
)
[
[
u
v
]
[
I
x
2
I
x
I
y
I
x
I
y
I
y
2
]
[
u
v
]
]
2
E_{AC}(\Delta u)=\sum_{i}w(x_i)\begin{bmatrix}{\begin{bmatrix} u & v \end{bmatrix}\begin{bmatrix} I_x ^2 & I_xI_y \\ I_xI_y & I_y^2 \end{bmatrix}\begin{bmatrix} u \\ v \end{bmatrix}}\end{bmatrix}^2
EAC(Δu)=∑iw(xi)[[uv][Ix2IxIyIxIyIy2][uv]]2设自相关矩阵(Auto-correlation Matrix)为
H
=
[
I
x
2
I
x
I
y
I
x
I
y
I
y
2
]
H=\begin{bmatrix}I_x ^2 & I_xI_y \\ I_xI_y & I_y^2\end{bmatrix}
H=[Ix2IxIyIxIyIy2] 则转化为求自相关矩阵的两个特征值
λ
0
λ
1
\lambda_0\lambda_1
λ0λ1。 此外,有
A
=
∑
i
w
(
x
i
)
[
I
x
2
I
x
I
y
I
x
I
y
I
y
2
]
A=\sum_{i}w(x_i)\begin{bmatrix}I_x ^2 & I_xI_y \\ I_xI_y & I_y^2\end{bmatrix}
A=∑iw(xi)[Ix2IxIyIxIyIy2]
Harris Detector
R
=
d
e
t
A
−
α
(
t
r
A
)
2
=
λ
0
λ
1
−
α
(
λ
0
+
λ
1
)
2
R=detA-\alpha (trA)^2=\lambda_0\lambda_1-\alpha(\lambda_0+\lambda_1)^2
R=detA−α(trA)2=λ0λ1−α(λ0+λ1)2
(
α
∈
[
0.04
,
0.06
]
)
(\alpha\isin[0.04,0.06])
(α∈[0.04,0.06])Harmonic Mean
f
=
d
e
t
A
t
r
A
=
λ
0
λ
1
λ
0
+
λ
1
f=\cfrac{detA}{ trA}=\cfrac{\lambda_0\lambda_1}{\lambda_0+\lambda_1}
f=trAdetA=λ0+λ1λ0λ1
SIFT
SIFT Detector
SIFT Describor