python入门opencv

1.读取和显示图片

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

#% matplotlib inline    #使用jupyter notebook时要写

# Import the image
img = cv2.imread('/home/mally/图片/1.png')
plt.imshow(img)
plt.show()          #不写这一句,图片出不来。
发布了114 篇原创文章 · 获赞 22 · 访问量 7006

猜你喜欢

转载自blog.csdn.net/qq_43235540/article/details/104024933