Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between Mean and Gaussian Filter in Result

Gaussian Smoothing use the sigma and the window size. And it blur the image to reduce the noise from image. On the other hand, Mean Filter also blur the image and remove the noise. What is the basic difference in result?

like image 456
Abc Avatar asked Jun 30 '15 07:06

Abc


1 Answers

Mean filter (rectangular kernel) is optimal for reducing random noise in spatial domain (image space). However Mean filter is the worst filter for frequency domain, with little ability to separate one band of frequencies from another. Gaussian filter has better performance in frequency domain.

Mean filter is the least effective among low-pass filters. Ideally it should stop high frequencies and pass only low frequencies. In reality it passes many high frequencies and stops some of the low frequencies (slow roll-off and poor stopband attenuation).

What it means in practice? Mean filter is fast and probably the best solution if you want to remove noise from image. It is bad solution if you want to separate frequencies present in the image.

The interesting thing is that you can implement Gaussian filter using Mean filter. If you apply Mean filter twice to the image you get the same result as applying triangular kernel filter. If you apply Mean filter 4 times to the image you get the same result as applying Gaussian kernel filter.

Gaussian filter uses convolution and is very slow. If you implement Mean filter using recursive formula it will run like lightning. Applying Mean filter many times you can speed up Gaussian implementation 1000 times.

To answer your question. Mean filter and Gaussian filter give similar results when removing noise from image. Gaussian filter is much better at separating frequencies. The best filter for this task is Windowed Sinc filter.

like image 189
Maciej Avatar answered Oct 21 '22 21:10

Maciej