python+opencv图像增强——拉普拉斯
img = cv2.imread(r'F:\python\work\cv_learn\clipboard.png',1)
cv2.imshow('input',img)
kernel = np.array([[0, -1, 0], [0, 5, 0], [0, -1, 0]])#定义卷积核
imageEnhance = cv2.filter2D(img,-1, kernel)#进行卷积运算
img = cv2.imread(r'F:\python\work\cv_learn\clipboard.png',1)
cv2.imshow('input',img)
kernel = np.array([[0, -1, 0], [0, 5, 0], [0, -1, 0]])#定义卷积核
imageEnhance = cv2.filter2D(img,-1, kernel)#进行卷积运算