從github下載的tesseract語言包不能使用,求指教!
代碼:
import tesserocr
from PIL import Image
image = Image.open('C:/20161202111647560.png')
result = tesserocr.image_to_text(image)
print(result)
通過安裝tesseract-ocr下載的語言包:
輸出:····正常,只是識別率不高。
但是如果github下載的tesseract-ocr語言包,替換原檔案后會報錯:
RuntimeError: Failed to init API, possibly an invalid tessdata path:
C:\Users\Administrator\AppData\Local\Programs\Python\Python37\Tesseract-OCR\tessdata/
求指教!!!
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/123811.html
下一篇:請教各位大神,這個怎么解決
