I was wondering if you could give me some advice on how to add impulsive and Gamma noise to an image separately? It's so easy with imnoise function of matlab, but i'm not allowed to use imnoise, Our TA said you can just use rand function.
I came across this code but it seems it doesn't work as it should(for impulse noise):
noisyimage=originalimage+255*rand(size(originalimage));