prewitt, sobel, canny 구현(python)
학습한 prewitt, sobel, canny에 대해 python으로 구현을 해봅시다. Code import cv2 import time import numpy as np import math from matplotlib import pyplot as plt def padding(img, n): x, y = img.shape # original image size padding_img = np.zeros((x+2*n, y+2*n)) # consider up,down,left,right padding_img[n:x+n, n:y+n] = img # zero padding return padding_img def edge_detection(img, mask1, mask2, threshold): img = pa..