Usman YousafZai
Usman YousafZai

Reputation: 1120

Remove Gaussian Noise using filter2

How to use arithmetic mean filter to remove Gaussian noise of a gray level image by using filter2 command.

Upvotes: 1

Views: 1858

Answers (1)

Luis Mendo
Luis Mendo

Reputation: 112659

First define a low-pass mask, for example

N = 5;
mask = ones(N)/N^2;

and then filter your image, say X, using

Y = filter2(mask,X);

Note that the mask has to be normalized, so that the filtered image has the same range of values as the original. Also, an all-ones mask is a very simple example; in practice there are better choices.

Upvotes: 2

Related Questions