Take the 2-minute tour ×
Signal Processing Stack Exchange is a question and answer site for practitioners of the art and science of signal, image and video processing. It's 100% free, no registration required.

In 1d signal processing, many types of low pass filters are used. Gaussian filters are almost never used, though.

Why are they so popular in image processing applications? Are these filters a result of optimizing any criterion or are just ad hoc solution since image 'bandwidth' is usually not well defined.

share|improve this question
add comment

5 Answers 5

up vote 13 down vote accepted

Image processing applications are different from say audio processing applications, because many of them are tuned for the eye. Gaussian masks nearly perfectly simulate optical blur (see also point spread functions). In any image processing application oriented at artistic production, Gaussian filters are used for blurring by default.

Another important quantitative property of Gaussian filters is that they're everywhere non-negative. This is important because most 1D signals vary about 0 ($x \in \mathbb{R}$) and can have either positive or negative values. Images are different in the sense that all values of an image are non-negative ($x \in \mathbb{R}^+$). Convolution with a Gaussian kernel (filter) guarantees a non-negative result, so such function maps non-negative values to other non-negative values ($f: \mathbb{R}^+ \rightarrow \mathbb{R}^+$). The result is therefore always another valid image.

In general, frequency rejection in Image processing in not as crucial as in 1D signals. For example, in modulation schemes your filters need to be very precise to reject other channels transmitted on different carrier frequencies, and so on. I can't think of anything just as constraining for image processing problems.

share|improve this answer
add comment

Gaussian filters are used in image processing because they have a property that their support in the time domain, is equal to their support in the frequency domain. This comes about from the Gaussian being its own Fourier Transform.

What are the implications of this? Well, if the support of the filter is the same in either domain, that means that the ratio of both supports is 1. As it turns out, this means that Gaussian filters have the 'minimum time-bandwidth product'.

So what you might say? Well, in image processing, one very important task is to remove white noise, all the while maintaining salient edges. This can be a contradictory task - white noise exists at all frequencies equally, while edges exist in the high frequency range. (Sudden changes in spatial signals). In traditional noise removal via filtering, a signal is low pass filtered, which means that high frequency components in your signal are completely removed.

But if images have edges as high frequency components, traditional LPF'ing will also remove them, and visually, this manifests itself as the edges becoming more 'smudged'.

How then, to remove noise, but also preserve high frequency edges? Enter the Gaussian kernel. Since the Fourier Transform of a Gaussian is also a Gaussian, the Gaussian filter does not have a sharp cutoff at some pass band frequency beyond which all higher frequencies are removed. Instead, it has a graceful and natural tail that becomes ever lower as the frequency increases. This means that it will act as a low pass filter, but also allow in higher frequency components commensurate with how quickly its tail decays. (On the other hand, a LPF will have a higher time bandwidth product, because its support in the F-domain is not nearly as big as that of a Gaussians').

This then allows one to attain the best of both worlds - noise removal, plus edge preservation.

share|improve this answer
1  
I'm not sure that you can compare the two supports directly since one is measured in time/length and the other one in Hz/radians. Their morphology is identical, but the universal scaling property still holds. –  Phonon Jul 31 '12 at 22:02
    
Thanks for the reminding me of the minimum time-bandwidth product. However, as Phonon mentioned, reducing spatial (~time) domain support necessarily increases bandwidth. There's no way you can have both noise suppression and preserve edges with a simple Gaussian filter. That's why Perona & Malik developed anisotropic filtering. –  nimrodm Aug 1 '12 at 13:28
    
@Phonon As I have seen, the supports are simply how many non-zero entries describe the function in either domain - I do believe they are the same. (Hence, ratio of 1). The being said, the time-bandwidth product is measured as a product of variance of the function in time and frequency. How its normalized differs from authors, I have seen it equated to either 1/2 or 1/4. –  Mohammad Aug 1 '12 at 13:36
1  
@nimrodm "reducing spatial (~time) domain support necessarily increases bandwidth.", Yes, that is the trend, stemming from the time-frequency inverse relationship. (This is where the time-frequency uncertainty comes from). However, the Gaussian function is of a class that totally minimizes this product. Given the inverse relationship between time and frequency, there is no way to do so unless it has equal support in both domains. –  Mohammad Aug 1 '12 at 13:39
    
@nimrodm In anisotropic diffusion, the kernels I have seen are still gaussian, albeit with covariance matricies that are dependent on the gradient of the image. (Its also a non-linear method, VS gaussian smoothing which is linear). But, the gaussian remains used due to its properties. –  Mohammad Aug 1 '12 at 13:51
show 2 more comments

You have good answers already, but I'll just add one further useful property of 2D Gaussian filters, which is that they are separable, i.e. the 2D filter can be decomposed into two 1D filters. This can be an important performance consideration for larger kernel sizes, since an MxN separable filter can be implemented with M+N multiply-adds whereas a non-separable MxN filter requires M*N multiply-adds.

share|improve this answer
2  
That's a good argument. A 2D Gaussian filter is both radially symmetric and still separable so implementation complexity is greatly reduced. –  nimrodm Aug 1 '12 at 13:30
add comment

The imagemagick manual has a great explanation of why filtering with sinc functions leads to "ringing" effects while gaussians do not. (http://www.imagemagick.org/Usage/fourier/#blurring and http://www.imagemagick.org/Usage/fourier/#circle_spectrum). When you have edges (discontinuities) in your image (which most images do) then completely chopping out all the high frequencies leaves you with ripples in the spatial domain. You also get ringing when you filter square waves with a sinc function in one dimension.

share|improve this answer
add comment

There has been beautiful answers already, but I will add my grain of salt, ot rather a different perspective:

Filtering at the most abstract level can be considered as applying some prior knowledge to some raw data. It means that applying some filtering algorithm is to apply this prior to find an optimum in signal to noise ratio, for instance.

For image, a classical prior is the smoothness of values (eg intensity) with respect to position (this can be seen as the point spread function mentioned by @Phonon). It is often modeled as a gaussian as it is the shape that you would obtain when mixing different objects with a known smoothness radius (this is called the central limit theorem). This is mostly useful when you wish to make derivatives of an image: rather than differentiating on the raw signal (which would produce a noisy output), you should do that on the smoothed image. This is equivalent to apply a wavelet-like operator such as Gabor filters.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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