Tesseract-OCR(图像文字识别)

本文记录图片文字识别库Tesseract-OCR的安装和使用。

步骤一:安装 tesseract 库(Python3)

# ORC图像处理库

anaconda search -t conda  tesseract

anaconda show mcs07/tesseract

conda install --channel https://conda.anaconda.org/mcs07 tesseract

注解:记得切换到Python3的开发环境

 

步骤二:安装tesseract程序

Win下的下载地址:https://github.com/tesseract-ocr/tesseract/wiki/Downloads

https://github.com/tesseract-ocr/tesseract/wiki/4.0-with-LSTM#400-alpha-for-windows

 

步骤三:操作使用

cd C:\Program Files (x86)\Tesseract-OCR

tesseract

tesseract -v                       #查看版本信息

tesseract --list-langs  #查看Tesseract-OCR支持语言

 

步骤四:改文件:

C:\Python3\Lib\site-packages\pytesseract\pytesseract.py,找到这两行:

# CHANGE THIS IF TESSERACT IS NOT IN YOUR PATH, OR IS NAMED DIFFERENTLY

tesseract_cmd = 'tesseract'

改为这样:

# CHANGE THIS IF TESSERACT IS NOT IN YOUR PATH, OR IS NAMED DIFFERENTLY

#tesseract_cmd = 'tesseract'

tesseract_cmd = 'C:/Program Files (x86)/Tesseract-OCR/tesseract.exe'

 

参考资料:

参考网址:https://www.cnblogs.com/qq21270/p/7704952.html

http://blog.csdn.net/u012566751/article/details/54094692   Tesseract-OCR入门使用1

http://blog.csdn.net/u012566751/article/details/54136836   Tesseract-OCR入门使用2

http://blog.csdn.net/u012566751/article/details/54141109   Tesseract-OCR入门使用3

https://github.com/tesseract-ocr/tesseract/wiki/APIExample   Tesseract API Example

http://tesseract-ocr.repairfaq.org/ 

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: