Warehouse Address: Https://github.com/RobinDavid/Pytesser
Install tesseract sudo Install Opencv-python
After installation, you need to download the identification file, because my environment is
Tesseract 3.02.02
leptonica-1.70
Zlib 1.2.11
So I downloaded 3.02 of the Chinese recognition training data, the address is
https://sourceforge.net/projects/tesseract-ocr-alt/files/
Need to extract to
/usr/local/share/tessdata
Then write the script test.py
Import= pytesser.image_file_to_string ("./test.png","chi_ Sim")print(TXT)
Run Python test.py
It's easy to recognize the text here.
Wen wo dou i Wensal in the dagger not to take the cloud, I went to buy a few pounds of oranges back this stem from I good article
But the obvious recognition rate is not high, we need to optimize the configuration, or to train a data.
Use Tesseract OCR (pytesser) in Python to identify text in a picture on Mac