Quick simple question, mean filter?

Hello Dear Experts,
Given a convolution mask J = ones(N)/N^2 and image I (with Gaussian noise miu = 0, sigma = alpha) of size MxM M>>N. I am filtering I using the J mask.
How the noise is reduced then? NewNoise = OldNoise/alpha, what is alpha?
For example, I is size NxN with noise, J = ones(5)/25.
Thanks a lot in advance!

 Respuesta aceptada

Image Analyst
Image Analyst el 14 de Jul. de 2012
Don't use bad names like I and J. Pick descriptive names that aren't easily confused with 1 (one) or the imaginary variable. So, taking that advice:
windowWidth = 5;
kernel = ones(windowWidth) / windowWidth ^2;
outputImage = conv2(inputImage, kernel);

3 comentarios

Steve
Steve el 14 de Jul. de 2012
I know how to do the operations in Matlab, my question is slightly different, what is the ratio between the noise? I was given the image with noise, performed the filter, but the noise still persists. Say newNoise, oldNoise, what is the ratio between them and how to compute it?
Thanks in advance!
Ryan
Ryan el 14 de Jul. de 2012
According to this thread from our friend Image Analyst the Newsreader:
signalImage1 = double(noiseFreeImage);
noiseOnlyImage = double(noisyImage) - signalImage1;
SNR = mean2(signalImage1 ./ noiseOnlyImage );
% SNR = Signal to Noise Ratio
Image Analyst
Image Analyst el 14 de Jul. de 2012
I'm not sure that you can get the sigma of the additive Gaussian noise unless you have the original noise free image, or at least make some assumptions on it. There are a variety of noise reduction algorithms. I suppose you could apply a good one (of which an averaging filter is not) and then subtract the noise-reduced version from the noisy version to get an estimate of the noise only. Then take the histogram (which should look like a Gaussian if it's additive Gaussian noise) to get an estimate of the sigma.

Iniciar sesión para comentar.

Más respuestas (0)

Productos

Preguntada:

el 14 de Jul. de 2012

Community Treasure Hunt

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

Start Hunting!

Translated by