11
$\begingroup$

I understand that a Laplacian-of-Gaussian filter can be approximated by a Difference-of-Gaussians filter, and that the ratio of the two sigmas for the latter should be 1:1.6 for the best approximation. However, I'm not sure how the two sigmas in the Difference of Gaussians relates to the sigma for the Laplacian of Gaussian. Is the smaller sigma in the former equal to the sigma of the latter? Is the larger sigma? Or is the relationship something else?

$\endgroup$
  • $\begingroup$ > I understand that a Laplacian-of-Gaussian filter can be approximated by a Difference-of-Gaussians filter, and that the ratio of the two sigmas for the latter should be 1:1.6 for the best approximation. sorry with what reference you knew this? $\endgroup$ – user16823 Jul 29 '15 at 11:03
  • $\begingroup$ Hi, I think this question would fit here - area51.stackexchange.com/proposals/86832/… It would also support the community. Thank You. $\endgroup$ – Royi Jul 31 '15 at 6:50
10
$\begingroup$

I understand that a Laplacian-of-Gaussian filter can be approximated by a Difference-of-Gaussians filter, and that the ratio of the two sigmas for the latter should be 1:1.6 for the best approximation

In theory, the smaller the ratio between two sigmas, the better the approximation. In practice, you'll get numerical errors at some point, but as long as you're using floating point numbers, smaller values than 1.6 will give you a better approximation.

To illustrate, I've plotted a cross-section of the LoG and DoG for a few values of k in Mathematica:

enter image description here

As you can see, k=1.6 is not an ideal approximation. For example, k=1.1 would give a much closer approximation.

But you usually want to calculate LoG approximations for a range of sigmas. (Otherwise, why bother with the DoG approximation at all? Calculating a single LoG filtered image isn't more expensive than calculating a single DoG filtered image.) So the value of k is usually chosen so that you can calculate a series of gaussian filtered images with sigmas s, sk, sk^2, s*k^3..., and then calculate the differences between adjacent gaussians. So if you choose a smaller k, you'd have to calculate more "layers" of gaussians for the same sigma-range. k=1.6 is a trade-off between wanting a close approximation and not wanting to calculate too many different gaussians.

However, I'm not sure how the two sigmas in the Difference of Gaussians relates to the sigma for the Laplacian of Gaussian. Is the smaller sigma in the former equal to the sigma of the latter?

From the formulas on the wiki page @Libor linked to, you can see that $t=\sigma ^2$, so the approximate a LoG for some sigma, you need two gaussians with sigmas $\sqrt{\sigma ^2+\text{$\Delta $t}}$ and $\sqrt{\sigma ^2-\text{$\Delta $t}}$ (at least in the limit $\text{$\Delta $t}\to 0$). Or, in terms of k:

$\sigma _{\text{Laplace}}=\sigma \sqrt{\frac{1+k^2}{2}}$

$\endgroup$
  • $\begingroup$ i'm sorry if i'm wrong, but isn't it that calculating LoG actually is more expensive than DoG. since gaussian can be separated into 2 1D filters, meaning the complexity will be linear O(2n) instead of polynomial O(n^2) $\endgroup$ – user1916182 Jun 13 '14 at 21:42
  • $\begingroup$ @user1916182: True, an LoG filter isn't separable, per se. But neither is a DoG filter. But they're both sums of two separable filters (two gaussians with different scale for the DoG, two 2nd order gaussian derivative filters for LoG). You do save time with DoG if you can use the "larger" of the two gaussians for the next scale level, so you have to calculate n+1 gaussians for n scales, in contrast to 2*n gaussian derivative filters for n LoG scales. $\endgroup$ – Niki Estner Jun 14 '14 at 7:20
3
$\begingroup$

Maybe the formulas here can help you.

Since the scale space representation satisfies diffusion equation, the LoG can be computed as difference between two slices of scale space.

Therfore, when deriving DoG formula, we first approximate the LoG with finite differencing. I think the specific ratio for sigma comes from the fact a unit step in scale is taken to approximate LoG in the first place.

$\endgroup$
  • $\begingroup$ Thanks, but I looked at those already. They don't seem to tell me whether sigma or k*sigma is the value corresponding to the t parameter (which is the same as the sigma value for the Laplacian of Gaussian equation). $\endgroup$ – visual-kinetic Jun 1 '12 at 16:34
  • 1
    $\begingroup$ It's somewhere in between: s < t < k*s. Since the difference (y(a) - y(b)) / (b-a) approximates (when b - a -> 0) the derivative at (a+b)/2. However, since you are not taking the limit of k->1, this is only an approximation and you cannot really pinpoint the best sigma (unless you definite a specific optimization criterion). $\endgroup$ – nimrodm Jun 2 '12 at 7:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.