文章参考于张平编著《OpenCV算法精解-基于Python与C++》 #coding=utf-8 import cv2 import sys if __name__=='__main__': if len(sys.argv)>1: image=cv2.imread(sys.argv[1],cv2.CV_LOAD_IMAGE_UNCHANGED) else: print('can not open the image') cv2.imshow('img',image) cv2.waitKey(0) cv2.destroyAllWindows() 调用代码:~/PycharmProjects/OpenCV$ python img_show.py tim2.jpg
Python-openCV读入图像
最新推荐文章于 2023-06-13 10:32:36 发布