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