pycharm 上安装opencv-python模块,opencv-contrib-python模块,python-pytesseract 模块
编写程序:
import cv2 as cv
src=cv.imread("C:/Users/a/Desktop/csdn/1.jpg") #read a picture
cv.namedWindow("input image",cv.WINDOW_AUTOSIZE) #create a GUI,named input image
cv.imshow("input image",src) #put picture into GUI,parameter:(GUI NAME,PICTURE)
cv.waitKey(0) #wait next operation
cv.destroyAllWindows() #free memory
print("hello")
测试结果: