# Why is the difference of gaussians scale space scale invariant?

I'll use the Scale-invariant feature transform algorithm as an example here. SIFT creates a scale space based on scaled gaussian filtering of an image, and then computes the difference of gaussians to detect potential interest points. These points are defined as the local minima and maxima across the difference of gaussians.

It is claimed that this approach is scale invariant (among other puzzling invariances). Why is this? It's unclear to me why this is the case.

• Don't know what SIFT is, found this on wiki en.wikipedia.org/wiki/Scale-invariant_feature_transform. "Lowe's method for image feature generation transforms an image into a large collection of feature vectors, each of which is invariant to image translation, scaling, and rotation, partially invariant to illumination changes and robust to local geometric distortion.". Is that the explanation? – niaren Oct 11 '11 at 6:28
• Yes, that's what I'm speaking about – water Oct 11 '11 at 12:13
• SIFT uses the scale-space theory. However I don' understand what is meant by "scale" invariancy in that theory. You can try reading Tony Lindeberg's papers about it: csc.kth.se/~tony/earlyvision.html – maximus Nov 1 '11 at 3:08

The term "scale-invariant" means the following here. Let's say you have image I, and you have detected a feature (aka an interest point) f at some location (x,y) and at some scale level s. Now let's say you have an image I', which is a scaled version of I (downsampled, for instance). Then, if your feature detector is scale-invariant, you should be able to detect the corresponding feature f' in I' at the corresponding location (x',y') and corresponding scale s', where (x, y, s) and (x', y', s') are related by the appropriate scaling transformation.

In other words, if your scale-invariant detector has detected a feature point corresponding to someone's face, and then you zoom in or out with your camera on the same scene, you should still detect a feature point on that face.

Of course, you would also want a "feature descriptor" which would allow you to match the two features, which is exactly what SIFT gives you.

So, at the risk of confusing you further, there are two things that are scale-invariant here. One is the DoG interest point detector, which is scale-invariant, because it detects a particular type of image features (blobs) irrespective of their scale. In other words, the DoG detector detects blobs of any size. The other scale-invariant thing is the feature descriptor, which is a histogram of gradient orientation, which stays more or less similar for the same image feature despite a change in scale.

By the way, the difference of Gaussians is used here as an approximation to the Laplacian-of-Gaussians filter.

• You have taken some information from the scale-space theory. Can you please describe the explanation of what exactly happens in comparison of two signals using the scale-space theory? The Lindeberg in his papers: csc.kth.se/~tony/earlyvision.html made some examples of detection of blobs etc. How actually the taking of derivative by the scale parameter helps in the scale invariancy? – maximus Nov 1 '11 at 3:11
• You are correct. I was merely trying to describe the intuition behind scale-space theory. What you are asking should be a separate question. :) I think what you are talking about is that derivatives taken at different scales must be normalized appropriately. As you go to coarser scales, the signal is smoothed, so it amplitude is reduced. That means that the magnitude of the derivatives is also reduced. Thus to compare derivative response across scales you need to multiply them by – Dima Nov 1 '11 at 14:12
• the appropriate power of sigma: first derivative by sigma, second by sigma^2, etc. – Dima Nov 1 '11 at 14:19
• @maximus, oops, I fogot the @. :) – Dima Nov 1 '11 at 14:37
• Thank you for your reply! It helped me, but there are still some questions which I asked as a different question here: dsp.stackexchange.com/questions/570/… – maximus Nov 1 '11 at 18:48

Difference of gaussians is not scale invariant. SIFT (to limited degree) scale invariant because it looks for DoG extrema across scale-space - that is finding scale in with DoG extremal both spatially and relatively to neighboring scales. Because output DoG is obtained for this fixed scale (that is not a function of input scale) result is scale-independent, that is scale-invariant.

• Right. But it only looks for extrema along neighboring scales. This is not all scales, unless I am mistaken. Even if it was all scales, it's still not clear how it's scale independent – water Oct 11 '11 at 12:16
• @water, that's exactly right. You do not want an extremum across all scales, you want local extrema. This lets you detect nested structures, e.g. a small dark circle within a large bright circle on gray background. – Dima Oct 12 '11 at 14:29
• DoG is used instead of LoG because it is faster to calculate the DoG. – maximus Nov 1 '11 at 3:06