Adding Noise to the Image
Ältere Kommentare anzeigen
How do I apply "salt" noise to the grey - scale image. Function need to generate salt noise only not the pepper.
Akzeptierte Antwort
Weitere Antworten (1)
Arun Kumar
am 17 Jul. 2014
1 Stimme
%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)
1 Kommentar
Steve
am 22 Jul. 2014
Kategorien
Mehr zu Images finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!