import cv2
import numpy as np
#filier 2D
savepath = "E:\\"
image = cv2.imread('E:\\me.jpg');
cv2.imshow('image', image)
#cv2.imwrite(savepath + 'me001'+'.jpg',image)
kernel1 = np.array([[-1,-1,-1],[-1,8,-1],[-1,-1,-1]])
dst = cv2.filter2D(image, -1, kernel1);
cv2.imshow('dst', dst)
cv2.imwrite(savepath + 'me005'+'.jpg',dst)
本站文章如无特殊说明,均为本站原创,如若转载,请注明出处:python图像卷积 - Python技术站