python识别图片中的信息

好好学习的第一步

一心一意的干好一件事儿,问自己

  • 我做什么
  • 我怎么做
  • 做的结果是啥

例子1

问题 回答
我做什么: 识别图片上的信息
我怎么做: 百度+谷歌
结果是啥: 完成识别

1 安装PIL
pip3 install pillow

2 安装pytesser3
pip3 install pytesser3

3 install pytesseract

4 install autopy3

5 install software Tesseract-OCR
tesseract -v

Ref

import pytesseract
from PIL import Image

path_of_pic = r'图片.png'
im = Image.open(path_of_pic)
text = pytesseract.image_to_string(im)
print(text)
posted @ 2019-06-04 14:56  既生喻何生亮  阅读(1106)  评论(0编辑  收藏  举报