macOS python3 简单验证码识别

版权声明:本文为博主原创文章,可以自由转载。 https://blog.csdn.net/u010953692/article/details/83692063

1,tesseract 库安装

brew search tesseract
brew install tesseract

2,pytesseract 安装

pip3 search pytesseract
pip3 install pytesseract
$ pip3 show pytesseract
Name: pytesseract
Version: 0.2.5
Summary: Python-tesseract is a python wrapper for Google's Tesseract-OCR
Home-page: https://github.com/madmaze/python-tesseract
Author: Samuel Hoffstaetter
Author-email: [email protected]
License: GPLv3
Location: /usr/local/lib/python3.7/site-packages
Requires: Pillow
Required-by: 
$ 

3,简单验证码 识别

在这里插入图片描述

>>> import pytesseract
>>> picture = pytesseract.image_to_string("/root/11.jpg")
>>> print (picture)
XAG/USD 17.218
>>> 

参考:

  1. mac+python+tesseract识别中文
  2. pytesseract 0.2.5 文档

猜你喜欢

转载自blog.csdn.net/u010953692/article/details/83692063