Adding poisson noise to an image

vdogsandman picture vdogsandman · Oct 10, 2013 · Viewed 17k times · Source

I have some images that I need to add incremental amounts of Poisson noise to in order to more thoroughly analyze them. I know you can do this in MATLAB, but how do you go about doing it in Python? Searches have yielded nothing so far.

Answer

Helder picture Helder · Aug 31, 2015

Actually the answer of Paul doesnt make sense.

Poisson noise is signal dependent! And using those commands, provided by him, the noise later added to the image is not signal dependent.

To make it signal dependent you shold pass the image to the NumPy's poisson function:

filename = 'myimage.png'
img = (scipy.misc.imread(filename)).astype(float)

noise_mask = numpy.random.poisson(img)

noisy_img = img + noise_mask