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