Removing Noise From an image in MATLAB
조회 수: 9 (최근 30일)
이전 댓글 표시
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
답변 (2개)
Image Analyst
2013년 8월 1일
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
Jarin Tasnim
2020년 11월 26일
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
Image Analyst
2020년 11월 26일
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."
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!