Removing Noise From an image in MATLAB

7 visualizaciones (últimos 30 días)
Chethan
Chethan el 1 de Ag. de 2013
Comentada: Image Analyst el 26 de Nov. de 2020
I'm using Geometric mean filter to remove noise instead of median filter as image quality goes off in former case. code shown below is a part of m-file to remove noise.
fname = getappdata(0, 'fname');
[a, map] = imread(fname);
x = ind2rgb(a, map);
b = im2double(x);
w=fspecial('gaussian',[3,3]);
geom=exp(imfilter(log(b),ones(3,3),'replicate')).^(1/3/3);
fname=imfilter(b,w,'replicate');
axes(handles.axes1);
imshow(fname);
If i press push button which is named 'Remove Noise' above code get executed irrespective of image quality/property. In the sense even if no noise is present, image will be subjected to filter.
My question, is there any way to detect whether noise is present or not, so that the moment i pressed push button if no Noise in image it should display a message stating 'NO NOISE TO REMOVE' automatically.

Respuestas (2)

Image Analyst
Image Analyst el 1 de Ag. de 2013
Any set of pixels could be all noise or no noise or something in between. There is no way to know unless you define what you consider to be noise. What is your definition?

Jarin Tasnim
Jarin Tasnim el 26 de Nov. de 2020
fname = getappdata(0, 'fname');
[a, map] = imread(fname);
x = ind2rgb(a, map);
b = im2double(x);
w=fspecial('gaussian',[3,3]);
geom=exp(imfilter(log(b),ones(3,3),'replicate')).^(1/3/3);
fname=imfilter(b,w,'replicate');
axes(handles.axes1);
imshow(fname);
  1 comentario
Image Analyst
Image Analyst el 26 de Nov. de 2020
This just removes details (noise, edges, whatever) from the image. And it looks identical to his original code. How does this answer the question:
"My question, is there any way to detect whether noise is present or not, so that the moment i pressed push button if no Noise in image it should display a message stating 'NO NOISE TO REMOVE' automatically."

Iniciar sesión para comentar.

Community Treasure Hunt

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

Start Hunting!

Translated by