Gaussian Blur Filter

The Gaussian blur filter is the best-known example of a LPF implemented with a nonuniform kernel. The mask coefficients for the Gaussian blur filter are samples from a 2D Gaussian function :
Gaussian Blur Filter
The parameter σ controls the overall shape of the curve: the larger the value of σ, the flatter the resulting curve.
Some of the most notable properties of the Gaussian blur filter are as follows:

  • The kernel is symmetric with respect to rotation; therefore, there is no directional bias in the result.
  • The kernel is separable, which can lead to fast computational implementations.
  • The kernel’s coefficients fall off to (almost) zero at the kernel’s edges.
  • The Fourier transform (FT) of a Gaussian filter is another Gaussian.
  • The convolution of two Gaussians is another Gaussian.
  • The output image obtained after applying the Gaussian blur filter is more pleasing to the eye than the one obtained using other low-pass filters.

Example

a = imread('image1.jpg');
b = fspecial('gaussian',[5 5],3);
c = fspecial('gaussian',[13 13],1);

bb = imfilter(a,b,'same');
cc = imfilter(a,d,'same');

subplot(2,2,1); imshow(a); title('first');
subplot(2,2,2); imshow(bb); title('second');
subplot(2,2,3); imshow(cc); title('third');

Output

Gaussian Blur

Share

You may also like...