Linux Installation TESSERACT-OCR
Preparatory work:
one. Compilation Environment :
1. GCC gcc-c++ make (this environment is a common machine, can be ignored)
Yum Install GCC GCC Make
2. Dependent packages: autoconf automake libtool libjpeg-devel libpng-devel libtiff-devel zlib-devel Leptonica (more than 1.67)
autoconf automake libtool libjpeg-devel libpng-devel libtiff-devel Zlib-devel can be installed via Yum:
Yum Install autoconf automake Libtool Yum Install libjpeg-devel libpng-devel libtiff-devel zlib-devel
Two. Leptonica requires source code compilation and installation
Resources:
http://paramountideas.com/tesseract-ocr-30-and-leptonica-installation-centos-55-and-opensuse-113
Http://www.leptonica.org/source/README.html
Download Leptonica Package: http://www.leptonica.org/source/leptonica-1.68.tar.gz
Switch to the leptonica-1.68 root directory after decompression
./Configure;
Make ; Make Install;
Three. Tesseract Installation:
Rely on installation to start installing Tesseract
Download tesseract-3.01 installation package: http://tesseract-ocr.googlecode.com/files/tesseract-3.01.tar.gz
Switch to the tesseract-3.01 root directory after decompression
--If you encounter an error like strngs.h:1: Error:stray ' \357 ' in program when you make, convert the Tesseract-3.01/ccutil/strngs.h file to ANSI encoding to save and recompile
./autogen. SH . /Configuremake doinstallldconfig
Tesseract English Language pack installation:
Download tesseract-3.01 English Language pack: http://tesseract-ocr.googlecode.com/files/tesseract-ocr-3.01.eng.tar.gz
After decompression, copy all files under Tesseract-ocr/tessdata to/usr/local/share/tessdata
Installation is complete.
Test it:
Switch to the tesseract-3.01 root directory after decompression (this directory has a self-phototest.tif can be used for testing)
Command line:
Tesseract phototest.tif Phototest-l Eng
Output:
Tesseract Open Source OCR Engine v3. on 0
In this case, a phototest.txt text file should be generated in the current directory, and the content is the text displayed phototest.tif.
From the Snowman Blog