窗口键+R输入cmd进入命令终端
输入:
pip install opencv-python --user -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
pip install opencv--contrib-python --user -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
打开图片
import cv2 as cv
src=cv.imread("D:\\python\\1.jpg")
cv.namedWindow("input image")
cv.imshow("input image",src)
cv.waitKey(0)
cv.destroyAllWindows()
print("成功打印")