向图像中分别加入高斯噪声和椒盐噪声

I=imread('pout.tif ');  
subplot(1, 3, 1),  imshow(I),  title('原始图像');
G=imnoise(I, 'gaussian');
subplot(1, 3, 2),  imshow(G),  title('高斯噪声图像');
imwrite(G, 'Gpout.tif');
J=imnoise(I, 'salt & pepper', 0.05);     
subplot(1, 3, 3),  imshow(J),  title('椒盐噪声图像');
imwrite(J, 'Jpout.tif');
0

Leave a Reply

Your email address will not be published.