Difference of Gaussians I use the following formula for DoG:

$$\frac{1}{\sigma} (\frac{x^2}{2\sigma^2}-1.0) e^{\frac{-x^2}{2\sigma^2}}$$

What is the relationship between this formula and the difference of two Gaussian functions?

Can someone show me how to apply DoG on a 1D signal in MATLAB? My input can be considered as a 1D real-valued function, and I applied the above formula to detect blobs. The results make sense except that I don't know why I get many local minima in a relatively flat region (i.e., function values at points in the region almost stay constant). Since I don't have enough signal processing/image processing background, I want to see what a constant signal look like after being convolved with a DoG filter.
The difference of gaussian (DOG) is the convolution of input image by difference of two gaussians usually with different standard devitations($\sigma$). The basic idea behind this is to capture edges or gradients in the images that are simplified by the gaussian with larger $\sigma$  but preserved by the smaller gaussian. This is form of scale space derivative, which basically analyses different frequency components in the image, by changing the $\sigma$s  of gaussians. Thus, its like a band-pass filter that rejects certain frequencies in the input.

If we consider an constant image with its value centered around the means of the gaussians, the result of the DOG would be a zero - indicating no gradient.Try this out for a basic tutorial.