0

what is the drawback in Laplacian of Gaussian filter? why are we going for Difference of gaussian?

Cris Luengo
  • 55,762
  • 10
  • 62
  • 120
van
  • 15
  • 9
  • Welcome to Stack Overflow! Please read [what this site is about](https://stackoverflow.com/about) and "[How to ask](https://stackoverflow.com/questions/how-to-ask)" before asking a question. – Xander Luciano Mar 16 '18 at 06:59

1 Answers1

0

There is no drawback in Laplace of Gaussian. I use it all the time. Difference of Gaussians is an approximation, but both need the same amount of computation:

  • LoG: convolution with the second derivative along x of a Gaussian + convolution with the second derivative along y of a Gaussian

  • DoG: convolution with a Gaussian - convolution with another Gaussian

Each of those convolutions is a separable operation, so both require 4 1D convolutions, and 1 intermediate image to store one of the two results.

Many people implement these operations differently, for example the LoG as a convolution with a Gaussian and then with a discrete Laplace operator. This is, again, an approximation, and could be slightly faster.

There are also separable approximations to the DoG (which require thus only 2 1D convolutions), but these are much less isotropic (which means not invariant to rotations of the image).

Little known fact: as the two sigmas in the Difference of Gaussians approach each other, the approximation becomes more similar to the Laplace of Gaussian.

EDIT: I have just posted a more elaborate answer over at Signal Processing.

Cris Luengo
  • 55,762
  • 10
  • 62
  • 120
  • Thank you! Could you tell me some applications of DoG where as LoG doesn't have? – van Mar 19 '18 at 05:31
  • @van4: The DoG appears naturally in scale spaces. You build a scale space by filtering the image with a Gaussian at a series of different sigmas. The difference between subsequent scales is a DoG. These differences then form a sort of "band-pass" space, each one contains image details of different sizes. – Cris Luengo Mar 19 '18 at 12:51
  • And obviously, didn't think about mentioning this tastier, a Gaussian is a low-pass filter, the difference between two low-pass filters is a band-pass filter. With a DoG you can tune both limits of the band-pass filter. – Cris Luengo Mar 19 '18 at 12:54