安装起来相当简单,但是看到很多博客的安装过程复杂得很。
pip install opencv-python
测试代码:
import cv2 as cv
img = cv.imread("f6759b83f3201997fd7ea1c9b9130a44.jpg")
cv.imshow("Display window", img)
k = cv.waitKey(0) # Wait for a keystroke in the window
运行命令: python .\demo.py