Additive effects of a 2D Gaussian filter

3 views (last 30 days)
Scott Holmes
Scott Holmes on 1 Sep 2011
Hello, I am curious as to if anyone knows if reapplying the Gaussian filter to an image will cause an linear increase or logarithmic....so forth change in effects. Any help would be greatly appreciated.

Answers (1)

David Young
David Young on 1 Sep 2011
Suppose you apply a Gaussian filter with width parameter SIGMA1 to an image, and then you apply a second Gaussian filter with parameter SIGMA2 to the output of the first operation.
The final result is the same as applying a single Gaussian filter with parameter SIGMA3 to the original image, where the widths are related by the Pythagorean formula:
2 2 2
SIGMA3 = SIGMA1 + SIGMA2
(The SIGMA parameter is sometimes, rather misleadingly, called the 'standard deviation' of the filter.)
This assumes that the filters are represented in sufficiently large arrays that truncation at the boundaries is negligible. In practice, because there is always some truncation, this result is approximate.
Repeated application of Gaussian filtering can be a useful technique to achieve high levels of smoothing, particularly in multi-scale "pyramid" representations.
  2 Comments
Scott Holmes
Scott Holmes on 6 Sep 2011
Thanks David, that clears things up. I am still struggling with something however and was hoping you or someone else might be able to shed some light on it. I have been successful in applying the gaussian filter, however the parameters used are eluding me at the moment. From what I understand, they represent the kernal size, and the standard deviation however I have played with both and don't seem to be getting noticeable differences in my filters. I have been using high contrast pictures to for tests to make any blurring more noticeable. Any words of advice or directions would be great as there seems to be a lack of published literature regarding this topic.
David Young
David Young on 10 Sep 2011
You need to make the kernel size big enough to avoid truncating the filter too much. It's convenient to keep the size odd, so I usually use something like this:
sz = 2*(ceil(2.6 * sigma)) + 1;
filter = fspecial('gauss', sz, sigma);
That's a compromise - it loses something like 1% of the total weight of the filter to truncation.
Then you just set sigma and let sz take care of itself. If you do that you'll find you get a very big difference for different values of sigma.

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!