python图像卷积

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)

上一篇:Bootstrap(转)


下一篇:Minix