opencv-python的基本使用

版权声明:转发使用请写明文章来源 https://blog.csdn.net/weixin_33278772/article/details/85836636
cv2.imread('img.png')
cv2.imshow('sr', show_img)
cv2.waitKey(0)
cv2.destroyAllWindows()

读取图片并显示

一定不要忘记加上

cv2.waitKey(0)
cv2.destroyAllWindows()

这可以让图片一直显示,并且不会出现异常的代码情况。

猜你喜欢

转载自blog.csdn.net/weixin_33278772/article/details/85836636