Removing Noise From an image in MATLAB
9 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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.
0 Kommentare
Antworten (2)
Image Analyst
am 1 Aug. 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?
0 Kommentare
Jarin Tasnim
am 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 Kommentar
Image Analyst
am 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."
Siehe auch
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!