   Difference of Gaussian (DoG)

Similar to Laplace of Gaussian, the image is first smoothed by convolution with Gaussian kernel of certain width  to get With a different width , a second smoothed image can be obtained: We can show that the difference of these two Gaussian smoothed images, called difference of Gaussian (DoG), can be used to detect edges in the image. The DoG as an operator or convolution kernel is defined as Both 1-D and 2-D functions of and and their difference are shown below:  As the difference between two differently low-pass filtered images, the DoG is actually a band-pass filter, which 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 discrete convolution kernel for DoG can be obtained by approximating the continuous expression of DoG given above. Again, it is necessary for the sum or average of all elements of the kernel matrix to be zero.

Comparing this plot with the previous one, we see that the DoG curve is very similar to the LoG curve. Also, similar to the case of LoG, the edges in the image can be obtained by these steps:

• Applying DoG to the image
• Detection of zero-crossings in the image
• Threshold the zero-crossings to keep only those strong ones (large difference between the positive maximum and the negative minimum)
The last step is needed to suppress the weak zero-crossings most likely caused by noise.

Edge detection by DoG operator:    