I am writing a MATLAB code where I want to add Poisson noise to images to see how well my algorithm performs. I want to test the code with a given signal to noise ratios (SNR). However, how do I add Poisson noise in order to obtain the same SNR? I have tested imnoise with MATLAB, but with a certain constant chosen, the SNR changes for image for image.
For the record, I have added noise on an image I using
Noisyimage = Constant*imnoise(I/constant, 'Poisson')
I measure the SNR as
signanoiseratio = snr(I, Noisyimage-I)
You need to read carefully the documentation of
imnoise():Namely the noise isn't added, it is a function of data.
To get what you want you need to use Poisson Random Number Generator and use it to generate noise to be added to the image (Remembering the connection between the variance and $ $ parameter of the Poisson Distribution which means they are equal).