案例用图:
import cv2
img = cv2.imread('data/cat.jpg',0)
img
import matplotlib.pyplot as plt
plt.imshow(img,'gray')
plt.show()
cv2.imwrite('name.jpg',img)
案例用图:
import cv2
img = cv2.imread('data/cat.jpg',0)
img
import matplotlib.pyplot as plt
plt.imshow(img,'gray')
plt.show()
cv2.imwrite('name.jpg',img)