python 使用pytesseract图片文字识别

python 使用pytesseract图片文字识别

2017年03月02日 16:10:14 Saj_L 阅读数:1742更多

个人分类: python

1. 安装tesseract

下载地址:http://digi.bib.uni-mannheim.de/tesseract/tesseract-ocr-setup-3.05.00dev.exe

安装完后,要在windows的默认系统环境变量path中添加tesseract的安装路径

2. 安装 pytesseract 模块

pip install pytesseract 

3. 简单图片识别代码

import pytesseract
from PIL import Image
image = Image.open("2.jpg")
print pytesseract.image_to_string(image)

猜你喜欢

转载自blog.csdn.net/jgw2008/article/details/84325217