Adding Noise to the Image
Mostrar comentarios más antiguos
How do I apply "salt" noise to the grey - scale image. Function need to generate salt noise only not the pepper.
Respuesta aceptada
Más respuestas (1)
Arun Kumar
el 17 de Jul. de 2014
1 voto
%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 comentario
Steve
el 22 de Jul. de 2014
Categorías
Más información sobre Images en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!