【问题标题】:image to text in pythonpython中的图像到文本
【发布时间】:2018-08-23 09:13:53
【问题描述】:
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 WHILE SCANNING STRING LITERAL”

什么问题????

【问题讨论】:

    标签: python-3.x pytesser


    【解决方案1】:

    可能问题:

    pytesseract.pytesseract.tesseract_cmd="C:\Program Files (x86)\Tesseract- 
    OCR\tesseract.exe'
    

    =>

    pytesseract.pytesseract.tesseract_cmd="C:\Program Files (x86)\Tesseract- 
    OCR\tesseract.exe"
    

    【讨论】:

      猜你喜欢
      • 2017-11-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-05-20
      • 1970-01-01
      • 1970-01-01
      • 2020-04-30
      • 2020-10-25
      相关资源
      最近更新 更多