Adding Noise to the Image
显示 更早的评论
How do I apply "salt" noise to the grey - scale image. Function need to generate salt noise only not the pepper.
采纳的回答
更多回答(1 个)
Arun Kumar
2014-7-17
1 个投票
%Prepare workspace
clear ; clc; close all;
%Read Imag
I=imread('cameraman.tif');
%create a random matrix
randM=rand(size(I));
% default density
d=.05;
%saturated value
randM(randM<d)=255;
%Add noise
I=uint8(double(I)+randM);
%show image
imshow(I)
类别
在 帮助中心 和 File Exchange 中查找有关 Images 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!