高斯差分算子

高斯差分算子(Difference of Gaussian,DoG)

高斯差分算子(Difference of Gaussian,DoG)提取图像f(x,y)f(x, y)边缘:使用两个高斯低通滤波器分别平滑图像,然后与二者差值

  1. 高斯低通滤波(a convolution with a Gaussian kernel of certain width σ1\sigma_{1}

Gσ1(x,y)=12πσ1exp(x2+y22σ12)G_{\sigma_{1}}(x, y) = \frac{1}{\sqrt{2 \pi} \sigma_{1}} \exp \left( - \frac{x^{2} + y^{2}}{2 \sigma_{1}^{2}} \right)

得到平滑图像

g1(x,y)=Gσ1(x,y)f(x,y)g_{1}(x, y) = G_{\sigma_{1}}(x, y) * f(x, y)

  1. 高斯低通滤波(a convolution with a Gaussian kernel of certain width σ2\sigma_{2}

Gσ2(x,y)=12πσ2exp(x2+y22σ22)G_{\sigma_{2}}(x, y) = \frac{1}{\sqrt{2 \pi} \sigma_{2}} \exp \left( - \frac{x^{2} + y^{2}}{2 \sigma_{2}^{2}} \right)

得到平滑图像

g2(x,y)=Gσ2(x,y)f(x,y)g_{2}(x, y) = G_{\sigma_{2}}(x, y) * f(x, y)

  1. 高斯差分

g1(x,y)g2(x,y)=(Gσ1(x,y)Gσ2(x,y))f(x,y)=DoGf(x,y)g_{1}(x, y) - g_{2}(x, y) = \left(G_{\sigma_{1}}(x, y) - G_{\sigma_{2}}(x, y)\right) * f(x, y) = \text{DoG} * f(x, y)

DoG\text{DoG}定义为:

DoGGσ1(x,y)Gσ2(x,y)=12π(1σ12exp(x2+y22σ12)+1σ22exp(x2+y22σ22))\text{DoG} \triangleq G_{\sigma_{1}}(x, y) - G_{\sigma_{2}}(x, y) = \frac{1}{\sqrt{2 \pi}} \left( \frac{1}{\sigma_{1}^{2}} \exp \left( - \frac{x^{2} + y^{2}}{2 \sigma_{1}^{2}} \right) + \frac{1}{\sigma_{2}^{2}} \exp \left( - \frac{x^{2} + y^{2}}{2 \sigma_{2}^{2}} \right) \right)

高斯差分算子
高斯差分算子
二维5×55 \times 5LoG\text{LoG}算子:

[00100012101216210121000100]\begin{bmatrix} 0 & 0 & 1 & 0 & 0 \\ 0 & 1 & 2 & 1 & 0 \\ 1 & 2 & -16 & 2 & 1 \\ 0 & 1 & 2 & 1 & 0 \\ 0 & 0 & 1 & 0 & 0 \\ \end{bmatrix}

DoG为带通滤波器(a band-pass filter),能同时滤除图像中的噪声及同质区域(removes high frequency components representing noise, and also some low frequency components representing the homogeneous areas in the image);仅保留通带内边缘信号(the frequency components in the passing band are assumed to be associated to the edges in the images)。

核矩阵各元素之和必须为零(the sum or average of all elements of the kernel matrix to be zero)

边缘检测步骤:

  1. DoG滤波(applying DoG to the image)

  2. 过零检测(detection of zero-crossings in the image)

  3. 门限判决(threshold the zero-crossings to keep only those strong ones (large difference between the positive maximum and the negative minimum))