Python-验证码识别

需要安装pillow,tesseract-ocr,tesseract库

tesseract-ocr需要去下载exe安装,然后要配置环境变量

要识别的验证码为

# -*- coding:utf-8 -*-
__author__ = "MuT6 Sch01aR"

import pytesseract
from PIL import Image

img = Image.open("test.jpg")
vcode = pytesseract.image_to_string(img)
print(vcode)

运行结果

识别成功

posted @ 2018-02-05 16:01  Sch01aR#  阅读(184)  评论(0编辑  收藏  举报