from PIL import Image
import pytesseract
import cv2
import cv2
img= cv2.imread('D:/ss.png')
pytesseract.pytesseract.tesseract_cmd="C:\Program Files (x86)\Tesseract-
OCR\tesseract.exe'
tex = pytesseract.image_to_string(Image.open('D:/ss.png'),lang='eng')
print(pytesseract.image_to_string(Image.open('D:/ss.png'),lang='eng'))
cv2.namedWindow("input image")
cv2.imshow("Input image",img)
cv2.waitKey(0)
cv2.destroyWindow('Test')
cv2.destroyWindow('Main')
执行时显示" EOF,同时扫描弦乐立场"
有什么问题????
答案 0 :(得分:0)
可能发布:
pytesseract.pytesseract.tesseract_cmd="C:\Program Files (x86)\Tesseract-
OCR\tesseract.exe'
=>
pytesseract.pytesseract.tesseract_cmd="C:\Program Files (x86)\Tesseract-
OCR\tesseract.exe"