Removing Noise From an image in MATLAB

7 vues (au cours des 30 derniers jours)
Chethan
Chethan le 1 Août 2013
Commenté : Image Analyst le 26 Nov 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.

Réponses (2)

Image Analyst
Image Analyst le 1 Août 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 le 26 Nov 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 commentaire
Image Analyst
Image Analyst le 26 Nov 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."

Connectez-vous pour commenter.

Community Treasure Hunt

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

Start Hunting!

Translated by