Tesseract模块
- tesseract库是一个将图像翻译成文字的OCR(光学文字识别)库
安装 Tesseract
sudo apt-get install tesseract-ocr
命令
tesseract 图片文件.jpg text
会生成一个.txt
文件
python使用安装模块 pytesseract
pip install pytesseract
在python中使用
import pytesseract
from PIL import Image
image = Image.open(图片.jpg)
pytesstract.image_to_string(image)