用load装载图像,加噪出现了问题怎么办
load sinsin;subplot(2,3,1);image(X);colormap(map);title('原图');
init=27888605800;
randn('seed',init);
X=X+50*randn(size(X));
subplot(2,3,2);image(X);colormap(map);
请问这程序,怎么把随机噪声改成椒盐和高斯噪声啊,很急啊,谢谢大家帮忙 load sinsin;
I = X;
imshow(uint8(I));
Y = uint8(I);
Z = imnoise(Y,'salt & pepper',0.02);
imshow(Z);这样可以加入随机噪声啊
页:
[1]