介绍
Python-tesseract是python的光学字符识别(OCR)工具。也就是说,它将识别并“读取”嵌入图像中的文本。
Python-tesseract是Google的Tesseract-OCR引擎的包装器。它作为独立的调用脚本也很有用,因为它可以读取Python Imaging Library支持的所有图像类型,包括jpeg,png,gif,bmp,tiff等,而tesseract-ocr默认只支持tiff和bmp。此外,如果用作脚本,Python-tesseract将打印已识别的文本,而不是将其写入文件。
参考:https://blog.youkuaiyun.com/u010675669/article/details/81663182
环境
windows 10;python3.7
安装
安装pytesseract
模块
pip install pytesseract
遇到的问题
问题1.
pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installed or it’s not in your path
解决:将pytesseract.py中的
tesseract_cmd = 'tesseract'
更改为