No account yet ?
Tested in Anaconda and Python 3.7
import cv2 import numpy as np import math def gaussian_noise_add(img): height, width, depth = np.shape(img) n_50 = np.random.normal(0, 50, [height, width, depth]) noisy = (img + n_50).clip(0, 255) return noisy if __name__ == "__main__": img = cv2.imread("Lenna.jpg") noisy_img = gaussian_noise_add(img) cv2.imwrite("Lenna_gaussian_noise.jpg", noisy_img)
Image-Restoration-in-Digital-Image-Processing - GitHub
Original image
Gaussian image noise
Welcome, my name is Eric Soupet and I am the administrator of the site elodees.com. elodees.com is a state of the art of Artificial Intelligence and aims to be collaborative, you can now offer content such as articles, events, tutorials, ... so don't hesitate !
Platform images credit : Pixabay - Pixabay License | Pexels - Pexels License