코드가 궁금하다면 댓글을 남겨주세요. import numpy as np import cv2 img = cv2.imread('test4.jpg', cv2.IMREAD_GRAYSCALE) img = cv2.resize(img, (400, 600)) new_x = np.zeros(img.shape) new_y = np.zeros(img.shape) img = np.pad(img, (1, 1), 'constant', constant_values = 0) mask_x = np.array([[-1, 0, 1], [-2, 0, 2], [-1, 0, 1]]) mask_y = np.array([[1, 2, 1], [0, 0, 0], [-1, -2, -1]]) for i in range(1, img.shape[0] - m..