python文字识别tesseract

# pip install pytesseract
# pip install pillow
import pytesseract
from PIL import Image
img = Image.open('text1.jpg')
text = pytesseract.image_to_string(img)
print(text)
# tesseract 命令行使用方法
# 安装 tesseract 此处下载
# https://tesseract-ocr.github.io/tessdoc/#binaries
#  tesseract 5.png stdout -l chi_sim

评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注