Let \Phi_t: \mathbb{R}^n \rightarrow \mathbb{R} denote the radial
Gaussian function \Phi_t(x) = \mathcal{N}(x|0, t) with mean 0 and variance t, i.e., the
multivariate Gaussian function \Phi_t(x) = \mathcal{N}(x|0, tI) with mean 0 and covariance tI. More explicitly, we have : \Phi_t(x) = \frac{1}{(2\pi{}t)^{n/2}} e^{-\frac{\|x\|^2}{2t}}. The difference of Gaussians with variances t_1 is the
kernel function :K_{t_1, t_2} = \Phi_{t_1} - \Phi_{t_2} obtained by subtracting the higher-variance Gaussian from the lower-variance Gaussian. The difference of Gaussian operator is the
convolutional operator associated with this kernel function. So given an
n-dimensional
grayscale image I:\mathbb{R}^n\rightarrow\mathbb{R}, the difference of Gaussians of the image I is the
n-dimensional image :I * K_{t_1, t_2} = I * (\Phi_{t_1} - \Phi_{t_2}) = I * \Phi_{t_1} - I * \Phi_{t_2}. Because convolution is bilinear, convolving against the difference of Gaussians is equivalent to applying two different Gaussian blurs and then taking the difference. In practice, this is faster because Gaussian blur is a
separable filter.
Approximation The difference of Gaussians can be thought of as an approximation of the
Mexican hat kernel function used for the
Laplacian of the Gaussian operator. The key observation is that the family of Gaussians \Phi_t is the fundamental solution of the heat equation :\partial_t\Phi_t(x) = \frac{1}{2}\Delta\Phi_t(x). The left-hand side can be approximated by the difference quotient :\frac{\Phi_{t + \delta{t}}(x) - \Phi_{t}(x)}{\delta{t}} = \frac{1}{\delta{t}}K_{t + \delta{t}, t}(x). Meanwhile, the right-hand side is precisely the
Laplacian of the Gaussian function. Note that the Laplacian of the Gaussian can be used as a filter to produce a Gaussian blur of the Laplacian of the image because I * \Delta\Phi_t = \Delta{I} * \Phi_t by standard properties of convolution. The relationship between the difference of Gaussians operator and the
Laplacian of the Gaussian operator is explained further in Appendix A in Lindeberg (2015). ==Details and applications==