For CentOS 7 run the following as root:

yum-config-manager --add-repo https://download.opensuse.org/repositories/home:/Alexander_Pozdnyakov/CentOS_7/
sudo rpm --import https://build.opensuse.org/projects/home:Alexander_Pozdnyakov/public_key
yum update
yum install tesseract 
yum install tesseract-langpack-deu


windows下载地址:https://github.com/UB-Mannheim/tesseract/wiki

2.python安装:

  pip install pytesseract

  pip install PILLOW
 
3.使用代码:
  
import pytesseract
from PIL import Image

image = Image.open('timg.jpg')
code = pytesseract.image_to_string(image)
print(code)

 

 

 

参考网址:https://blog.csdn.net/qq_37193537/article/details/81335165

https://blog.csdn.net/qq_14998713/article/details/78824859

posted on 2019-09-17 11:36  大话人生  阅读(534)  评论(0编辑  收藏  举报