noise removal in Image

11 ビュー (過去 30 日間)
FIR
FIR 2012 年 12 月 13 日
I have to remove noise in image ,i di dit ny median,weiner,progressive median,but i did not get any codes for switching median filter,can you please tell is three any codes available fir it

採用された回答

Jürgen
Jürgen 2012 年 12 月 13 日
Hi, first, quite a challenge to understand your question?
did you check ' How to remove noise? or something like that in matlab help it is quite well explained
ImageOrg = imread('ImageName'); ImageFilt= medfilt2(ImageOrg, [m n]) with m and n the size of your window
r,J

その他の回答 (2 件)

Image Analyst
Image Analyst 2012 年 12 月 13 日
編集済み: Image Analyst 2012 年 12 月 14 日
I don't know what "switching median" or "progressive median" filters are. They may just be names that some authors invented for their particular twist on the standard median filter. There are probably programs for them if you read about them somewhere - ask the authors. Here's a modified median filter demo I've posted before.
clc; % Clear command window.
clear; % Delete all variables.
close all; % Close all figure windows except those created by imtool.
imtool close all; % Close all figure windows created by imtool.
workspace; % Make sure the workspace panel is showing.
fontSize = 15;
% Read in a standard MATLAB demo image.
folder = fullfile(matlabroot, '\toolbox\images\imdemos');
baseFileName = 'coins.png';
% Get the full filename, with path prepended.
fullFileName = fullfile(folder, baseFileName);
if ~exist(fullFileName, 'file')
% Didn't find it there. Check the search path for it.
fullFileName = baseFileName; % No path this time.
if ~exist(fullFileName, 'file')
% Still didn't find it. Alert user.
errorMessage = sprintf('Error: %s does not exist.', fullFileName);
uiwait(warndlg(errorMessage));
return;
end
end
grayImage = imread(fullFileName);
% Get the dimensions of the image. numberOfColorBands should be = 1.
[rows columns numberOfColorBands] = size(grayImage);
% Display the original image.
subplot(2, 2, 1);
imshow(grayImage);
title('Original Gray Scale Image', 'FontSize', fontSize);
% Enlarge figure to full screen.
set(gcf, 'Position', get(0,'Screensize'));
% Generate a noisy image with salt and pepper noise.
noisyImage = imnoise(grayImage,'salt & pepper', 0.05);
subplot(2, 2, 2);
imshow(noisyImage);
title('Image with Salt and Pepper Noise', 'FontSize', fontSize);
% Median Filter the image:
medianFilteredImage = medfilt2(noisyImage, [3 3]);
% Find the noise. It will have a gray level of either 0 or 255.
noiseImage = (noisyImage == 0 | noisyImage == 255);
% Get rid of the noise by replacing with median.
noiseFreeImage = noisyImage; % Initialize
noiseFreeImage(noiseImage) = medianFilteredImage(noiseImage); % Replace.
% Display the image.
subplot(2, 2, 3);
imshow(noiseFreeImage);
title('Restored Image', 'FontSize', fontSize);
  1 件のコメント
FIR
FIR 2012 年 12 月 14 日
Thanks a lot Image alalyst

サインインしてコメントする。


Jürgen
Jürgen 2012 年 12 月 13 日
編集済み: Jürgen 2012 年 12 月 13 日
Ok so I indeed did not understand your question, I got interested and just did some googling: first found a paper: http://www.ijser.org/researchpaper%5CSwitching-Median-Filter-For-Image-Enhancement.pdf and then found http://www.mathworks.com/matlabcentral/fileexchange/21757-progressive-switching-median-filter I think that could help , basically the result of some googling regardsJ
  1 件のコメント
Image Analyst
Image Analyst 2012 年 12 月 14 日
Good searching. It looks like nedfilt2(), imerode(), and imdilate() could be used to implement that algorithm fairly quickly.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeImage Processing and Computer Vision についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by