标签:python库 from div 硬件 machine class source org win10
[硬件环境]
Win10 64位
[软件环境]
Python版本:2.7.3
Python库:
1.1) Pillow
1.2) Pytesseract
其他:
1.1) Tesseract-OCR的可执行文件
[搭建过程]
Tesseract-OCR:
1. 安装Tesseract-OCR的可执行文件
2. 安装Pillow库
3. 安装Pytesseract库
[相关代码]
#1.Install tesseract-ocr*.exe from http://jaist.dl.sourceforge.net/project/tesseract-ocr-alt/tesseract-ocr-setup-3.02.02.exe #2.Install pillow as"pip install form *.whl" #3.Install pytesseract as"pip install form *.whl" import pytesseract from PIL import Image image = Image.open(r"D:\Project\AI\1.MachineLearning\A.Tensorflow\2.Python_Prj\FirstPython\Resources\Salt_OCR2.png") code = pytesseract.image_to_string(image) code = code.replace(‘ ‘, ‘‘); code = code.replace(‘-‘, ‘‘); print(code)
Python调用Tesseract-OCR完成图片OCR识别
标签:python库 from div 硬件 machine class source org win10
原文地址:http://www.cnblogs.com/jayhust/p/7634436.html