How to find out whether guassian or salt& pepper noise present in an image, Is there any algorithm
Exploit the fact that salt&amp;pepper noise has only 2 values and median filter does excellent job in getting rid of it.


Filter your image with median filter
Find pixels where median filter did most of its job
Plot histogram of those pixels
Compute fraction of 0s and 1s

threshold = 0.2; % adjust to perform best on your images
im = imread('../lena.bmp');
imd = double(im);
imd = imd./max(max(imd));
imdg = imnoise(imd,'gaussian');
imdsp = imnoise(imd,'salt &amp; pepper');
subplot(2,2,1), imshow(imdg)
subplot(2,2,2), imshow(imdsp)
imdgf = medfilt2(imdg);
imdspf = medfilt2(imdsp);
g = imdg.-imdgf;
sp = imdsp.-imdspf;
gm = abs(g)&gt;threshold;
spm = abs(sp)&gt;threshold;
subplot(2,2,3), hist(imdg(gm))
subplot(2,2,4), hist(imdsp(spm))
waitforbuttonpress