发布时间:2019-08-02 11:14:57编辑:auto阅读(2530)
安装库
pip install pytesseract
pip install Pillow
windows安装 tesseract 中文识别
下载地址:https://digi.bib.uni-mannheim.de/tesseract/
运行安装:tesseract-ocr-setup-4.00.00dev.exe
安装路径:C:\Anaconda3\Tesseract-OCR
安装完成后设置环境变量
1、添加环境变量
2、添加系统变量
重启
from PIL import Image
import pytesseract
text=pytesseract.image_to_string(Image.open('xxx.jpg'),lang='chi_sim') # 使用中文
print(text)
上一篇: python的异常处理
下一篇: python生成html报告
50986
50369
40984
37852
32315
29206
28091
22920
22887
21217
1082°
1763°
1444°
1378°
1650°
1465°
2121°
3680°
3614°
2538°