Generate/Simulate noise for images in Python to resemble high ISO shoot

Viewed 149

I am trying to generate some noisy images to train my model. The problem is I could not find any library that does so realistically.

For example, with this images:

make-picture-less-grainy-1.jpg

I tried to use the skimage.util.random_noise with variable grain size (default is always 1 pixel) but still I cannot replicate the noise as shown in the picture.

Any idea how to replicate such noise. It seems to be caused by using camera with high ISO settings.

1 Answers

So apparently the "noise" generated from high-ISO image are actually the result of the denoising process done by the camera.

Try to use fastNlMeansDenoisingColored can provide some good result

def denoise(img):
    im_arr = np.asarray(img)
    dst = cv2.fastNlMeansDenoisingColored(im_arr, None, 10, 10, 7, 21)
    return Image.fromarray(dst)
Related