I have to add salt and pepper noise in an image where the noise density of pepper is 0.1 and the noise density of salt is 0.2. How to do this in matlab
I know img = imnoise2(img,'salt & pepper',M,N,a,b) I know img is image M,N = size of image but between a and b which is the density of which is what's confusing me. Please help