pytesseract用法

import pytesseract
from PIL import Image
pytesseract.pytesseract.tesserac_cmd = r'D:\Tesseract-OCR\tesseract.exe'
tessdat.dir.config = r'--tessdata-dir "D:\Tesseract-OCR\tessdata"'
image.Image.open('demo.jp.)
print(pytesseract.image_to_string(image,lang='eng',config=tessdata.dir.config))

github地址 :https://github.com/tesseract-ocr/tessdata

posted @ 2023-11-05 18:47  ty1539  阅读(21)  评论(0编辑  收藏  举报