首页 > 其他 > 详细

简单验证码识别

时间:2020-01-21 14:31:32      阅读:79      评论:0      收藏:0      [点我收藏+]

from
PIL import Image import pytesseract im = Image.open(./1.jpg) imgry = im.convert(L) threshold = 140 table = [] for i in range(256): if i < threshold: table.append(0) else: table.append(1) out = imgry.point(table, 1) print(out) str = pytesseract.image_to_string(out) print(str)
安装插件 # https://github.com/tesseract-ocr/tesseract/wiki
sudo apt install tesseract-ocr
sudo apt install libtesseract-dev
pip install pytesseract
pip install Pillow


简单验证码识别

原文:https://www.cnblogs.com/chengfengchi/p/12221567.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!