import numpy as np import cv2 from random import random from google.colab.patches import cv2_imshow import copy img_path = '/content/drive/My Drive/다핏문제/909/lena.jpg' 다음 함수를 적용해서 이미지에 노이즈를 추가한다. def salt_and_pepper(image, p): output = np.zeros(image.shape,np.uint8) thres = 1 - p for i in range(image.shape[0]): for j in range(image.shape[1]): rdn = random() if rdn < p: output[i][j] = 0 elif..