In imaging science, difference of Gaussians (DoG) is a feature enhancement algorithm that involves the subtraction of one Gaussian blurred version of an original image from another, less blurred version of the original.
Blurring an image using a Gaussian kernel suppresses only high-frequency spatial information.
Subtracting one image from the other preserves spatial information that lies between the range of frequencies that are preserved in the two blurred images.
Thus, the DoG is a spatial band-pass filter that attenuates frequencies in the original grayscale image that are far from the band center.
In practice, this is faster because Gaussian blur is a separable filter.
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.
is the fundamental solution of the heat equation The left-hand side can be approximated by the difference quotient Meanwhile, the right-hand side is precisely the Laplacian of the Gaussian function.
[2] As a feature enhancement algorithm, the difference of Gaussians can be utilized to increase the visibility of edges and other detail present in a digital image.
A wide variety of alternative edge sharpening filters operate by enhancing high frequency detail, but because random noise also has a high spatial frequency, many of these sharpening filters tend to enhance noise, which can be an undesirable artifact.
The difference of Gaussians algorithm removes high frequency detail that often includes random noise, rendering this approach one of the most suitable for processing images with a high degree of noise.
A major drawback to application of the algorithm is an inherent reduction in overall image contrast produced by the operation.
[1] When utilized for image enhancement, the difference of Gaussians algorithm is typically applied when the size ratio of kernel (2) to kernel (1) is 4:1 or 5:1.
The exact values of sizes of the two kernels that are used to approximate the Laplacian of Gaussian will determine the scale of the difference image, which may appear blurry as a result.
Differences of Gaussians have also been used for blob detection in the scale-invariant feature transform.
In fact, the DoG as the difference of two Multivariate normal distribution has always a total null sum and convolving it with a uniform signal generates no response.
It may easily be used in recursive schemes and is used as an operator in real-time algorithms for blob detection and automatic scale selection.
In its operation, the difference of Gaussians algorithm is believed to mimic how neural processing in the retina of the eye extracts details from images destined for transmission to the brain.