//Add various types of noises to image
//Scilab 5.4.1
//Windows 10 
//Requires SIVP, IPD toolboxes

clear;
clc;

lenna=imread('Lenna.png');

//Gaussian
lenaNgaussian = imnoise(lenna,'gaussian');
imwrite(lenaNgaussian,'lenaNgaussian.jpeg');

//Speckle
lenaNspeckle = imnoise(lenna,'speckle');
imwrite(lenaNspeckle,'lenaNspeckle.jpeg');

//Salt & Pepper
d=0.25  //drop out noise
lenaNsalpep = imnoise(lenna,'salt & pepper',d);
imwrite(lenaNsalpep,'lenaNsalpep.jpeg');
