随机噪声:
>> snoise = 0.25*randn(size(original));
>> j = imadd(original,im2uint8(snoise));
>> imshow(j);
>> imwrite(j,'H:\randNoise0.25.jpg','JPG'); %imwrite可以确保保存的图片周围没有save as的白色区域
椒盐噪声:
>> j = imnoise(original,'salt & pepper',0.01);
高斯噪声:
>> j = imnoise(original,'gaussian',0,0.01);