10、python图像识别库tesseract下载及配置

'''
1、官网下载:https://github.com/tesseract-ocr/tessdata/tree/3.04.00,网上有相应的exe文件下载安装,安装完成后把安装目录加到环境变量中,需要重启电脑 。
	可下载相应的语言训练包放到tessdata目录下chi_sim开头的是识别中文的训练包。eng开头的是识别英文及数字的包

2、cmd命令安装pytesseract

3、在python中即可使用
'''

from pytesseract import *
from PIL import Image
# 打开图片流
image = Image.open("test.png")
# lang需要指定一下识别语言,默认是eng
str = image_to_string(image,lang='chi_sim')
print(str)
原文地址:https://www.cnblogs.com/toloy/p/8631034.html