opencv如何在jupyter notebook中显示图片

方法一:

from matplotlib import pyplot as plt
import numpy as np
import cv2

img = cv2.imread('img.jpg')
img2 = img[:,:,::-1] # 必须为 ::-1
plt.imshow(img)

 

posted @ 2018-06-08 22:14  newAdmin  阅读(12217)  评论(0编辑  收藏  举报