Addition And Subtraction of Noise
clc;clear all;
f=imread('cameraman.tif');
figure;
subplot(3,3,1);
imshow(f);
title('input image');
j=imnoise(f,'salt & pepper',0.05);
subplot(3,3,2);
imshow(j);
title('salt & pepper noise adding');
n=medfilt2(j,[3,3]);
subplot(3,3,3);
imshow(h);
title('removal of salt and pepper noise');
j1=imnoise(f,'gaussian',0.01);
subplot(3,3,4);
imshow(j1);
title('gaussian noise');
n1=wiener(j1,[3,3]);
subplot(3,3,5);
imshow(n1);
title('removal of gaussian noise');
j2=imnoise(f,'poisson');
subplot(3,3,6);
imshow(j2);
title('poisson noise');
n2=wiener2(j2,[3,3]);
subplot(3,3,7);
imshow(n2);
title('removal of poisson noise');
j3=imnoise(f,'speckle',0.05);
subplot(3,3,8);
imshow(j3);
title('speckle noise');
n3=wiener2(j3,[3,3]);
subplot(3,3,9);
imshow(n3);
title('removal of speckle noise');
0 comments:
Post a Comment