Compile and install Tesseract-OCR in centos

Source: Internet
Author: User
Compile and install Tesseract-ocrposted on in centos

2012-01-30
York_gu

It has been nearly three months since the previous blog titled automatic identification of simple verification Codes Using gocr. Recently, verification codes have been cracked again, but this time, the verification code is more complicated. gocr is not powerful enough. The accuracy of pure digital recognition is indeed high, but the mixed numbers and letters cannot be handled. So this time, we changed Tesseract-OCR to an advanced one.

As the most popular free Linux release version, the yum that comes with centos is really bad, not even Tesseract-OCR.

Install tesseract. First install some dependent libraries.

1234 wgettar xvf leptonica-1.68.tar.gzcd leptonica-1.68./configure; make; make install

Then, the source code of tesseract is compiled and installed. When writing this blog post, the latest tesseract version is 3.0.1.

123456 wgettar xvf tesseract-3.0.1.tar.gzcd tesseract-3.0.1./autogen.shmkdir m4; ./configuremake; make install

The compilation and installation of tesseract requires automake and libtool, which can be directly installed through yum. In addition to this, the source code of tesseract also contains a trap that requires manual adjustment before compilation passes:

12 vim ccutil/strngs.hDelete the first garbled character in the header of the first line, that is, the word <feff> is displayed in vim.

After the compilation and installation are complete, you also need to install the corresponding language pack. When installing the Language Pack, you only need to decompress the Language Pack and put it in the corresponding directory.

12 tar xvf tesseract-ocr-3.01.eng.tar.gzmv tesseract-ocr/tessdata/* /usr/local/share/tessdata/
Related Article

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.