Use Tesseract OCR (pytesser) in Python to identify text in a picture on Mac

Source: Internet
Author: User
Tags tesseract ocr

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.