当前位置: 移动技术网 > IT编程>脚本编程>Python > Python 进行 OCR识别 -- pytesseract库

Python 进行 OCR识别 -- pytesseract库

2020年01月14日  | 移动技术网IT编程  | 我要评论

媚语江山,海杆,湖北医药学院首页

pip install pytesseract



报错:tesseract is not installed or it's not in your path

识别中文需要新的字库

图片:english.png



图片:chinese.png



识别

import pytesseract
from pil import image

im_en = image.open('english.png')
im_ch = image.open('chinese.png')

print('========识别字母========')
print(pytesseract.image_to_string(im_en), '\n\n')

print('========识别中文========')
print(pytesseract.image_to_string(im_ch, lang='chi_sim'))


结果




如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网