Python _ text recognition engine trial: Tesseract-OCR

Source: Internet
Author: User

Tesseract-OCR is an OCR engine developed by the HP lab from 1985 to 1995. Later, it was developed by Google and open-source. It supports multiple platforms and supports up to 40 languages, including Chinese, supports training. Tesseract-OCR is a command line.ProgramBut it also provides wrapper in multiple languages, such as. net.
, Python, Ruby, C, and Java to facilitate integration into programs.

The command line call is simple:

Tesseract.exe <image> <outputname> [-l Lang] [configs]

<Image>:Path of the image to be recognized

<Outputname>:In the hosts file.

[-L Lang]:The English dictionary is provided by default. To recognize Chinese or other languages, you must download the corresponding language pack and store it in the "/tessdata" directory of the program, for example, I downloaded a simplified Chinese package named "chi_sim.traineddata" and decompressed it to the "tessdata" directory. The value is-l chi_sim ".

[Configs]:Configuration item.

Call example:Tesseract.exe D: \ test.jpg resultfile-l chi_sim

tested, the English recognition rate is still relatively high, but the recognition rate is very poor when the font is relatively small. I entered my mobile phone number on the notepad, 10 PX font, and then tested and found that the recognition error was found, then, I scaled up the source image to 200%, and then tested it. The recognition is correct. When I tested Chinese, the recognition rate was not high in English, and there was also a high recognition error rate when the font was not large enough, the recognition rate can be improved by enlarging images or fonts. Regular verification code recognition is fine, But conjoined characters cannot be recognized

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.