python 验证码识别

 先写上一个简洁无脑操作的识别

"""
需要安装
pillow、pytesseract、tesseract-ocr
windows testeract-ocr安装失败方法:
https://www.cnblogs.com/hupeng1234/p/7136442.html
"""

import pytesseract
from PIL import Image
image = Image.open('wm.gif')
pytesseract.pytesseract.tesseract_cmd = r'D:\Program Files (x86)\Tesseract-OCR\tesseract.exe'
vcode = pytesseract.image_to_string(image)
print(vcode)

 后续会补上一个专业版的

posted @ 2018-01-17 10:52  田云  阅读(170)  评论(0编辑  收藏  举报