The company has a need, so we have to study ha. Recently the company needs to read the verification code. So we studied the image recognition. Should be the legendary (OCR: Optical Character recognition OCR), the following today's harvest finishing one for everyone to do a share.
My program with the tesseract, the official address: https://code.google.com/p/tesseract-ocr/. Not for others, who let it support our heavenly writings ~ ha
Download the program and unzip it:
Can probably see such a folder. Don't take offense the landlord inside a pile of test files.
Then we start our test trip:
How to use tesseract :
Number 1: Documents that need to be identified
Parameter 2: The output file name, the output is a text file. It holds the information that is identified.
Recognize the two parameters of English can be. Here's an experiment:
We entered in the command line: Tesseract 5.jpg 6, can see the program generated a 6.txt, which holds the recognized text, how simple and to force ~
It says that Tesseract is in support of Chinese, so let's see how we can use tesseract to realize our Chinese recognition, the following continue to refer to other parameters
Number of references 3:-l
Number 4: The language library used
The reference 3-l should be aware of the language library used in the 4, the default English, which is why the above example of identifying English, and did not enter the number of parameters 3 and 4. The recognition is also realized.
The following continues our experiment:
We prepared a picture, then use tesseract zhongwen.jpg 7-l chi_sim to specify the Chinese language, and then on, or very good, after all, our Chinese is so profound. And Tesseract can be trained, and then the ability to read will be greatly improved.
Well, because a line of code did not write, do not upload code, we go to the official website to download. Next I will use Java to implement this small program with everyone.
Suppose this article is useful to you. Like a ~ welcome message, More Exchange ~
Java OCR tesseract Image Intelligent character recognition technology