1. 程式人生 > >macOS python3 簡單驗證碼識別

macOS python3 簡單驗證碼識別

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 文件