1. 程式人生 > >opencv如何在jupyter notebook中顯示圖片

opencv如何在jupyter notebook中顯示圖片

pre book matplot clas AS AD color 必須 mat

方法一:

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

img = cv2.imread(img.jpg)
img2 = img[:,:,::-1] # 必須為 ::-1
plt.imshow(img)

opencv如何在jupyter notebook中顯示圖片