In [9]:
image = cv2.imread('game_of_thrones_002_dragon.jpg',cv2.IMREAD_GRAYSCALE)
gaussian_noise = (gaussian_noise*0.5).astype(np.uint8)
noisy_image1 = cv2.add(image,gaussian_noise)

cv2.imshow('Noisy image - Gaussian noise',noisy_image1)
cv2.waitKey()
cv2.imwrite("Noisy image1.jpg",noisy_image1)
Out[9]:
True
In [10]:
uniform_noise = (uniform_noise*0.5).astype(np.uint8)
noisy_image2 = cv2.add(image,uniform_noise)

cv2.imshow('Noisy image - Uniform noise',noisy_image2)
cv2.waitKey()
cv2.imwrite("Noisy image2.jpg",noisy_image2)
Out[10]:
True
In [11]:
impulse_noise = (impulse_noise*0.5).astype(np.uint8)
noisy_image3 = cv2.add(image,impulse_noise)

cv2.imshow('Noisy image - Impuls noise',noisy_image3)
cv2.waitKey()
cv2.imwrite("Noisy image3.jpg",noisy_image3)
Out[11]:
True