Adding poisson noise to an image

后端 未结 5 623
忘了有多久
忘了有多久 2021-01-06 09:55

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 a

5条回答
  •  南笙
    南笙 (楼主)
    2021-01-06 10:31

    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
    

提交回复
热议问题