Install Tesseract 3-03

Install Tesseract 3 – tested on Linux Mint Rebecca 17.1

Check https://code.google.com/p/tesseract-ocr/wiki/Compiling and install dependencies:

sudo apt-get install autoconf automake libtool
sudo apt-get install libpng12-dev
sudo apt-get install libjpeg62-dev
sudo apt-get install libtiff4-dev
sudo apt-get install zlib1g-dev
sudo apt-get install libicu-dev # (if you plan to make the training tools)
sudo apt-get install libpango1.0-dev # (if you plan to make the training tools)
sudo apt-get install libcairo2-dev # (if you plan to make the training tools)

Install leptonica – Download from: http://www.leptonica.com/
tar -zxvf LEPTONICA_FILE.tar.gz
./configure
make
sudo make install

Check libraries:
Ensure that the development headers for Leptonica are installed before compiling Tesseract. Note that if building Leptonica from source, you may need to ensure that /usr/local/lib is in your library path. This is a standard Linux bug, and the information at the following thread in Stackoverflow is very helpful.http://stackoverflow.com/questions/4743233/is-usr-local-lib-searched-for-shared-libraries

sudo nano /etc/ld.so.conf
include /usr/local/lib

Installing the 3.03 versionhttps://drive.google.com/folderview?id=0B7l10Bj_LprhQnpSRkpGMGV2eE0&usp=sharing:
You can now build and install tesseract by running:

./autogen.sh
./configure
make
sudo make install
sudo ldconfig

Download the Tesseract-ocr language data package you want here: http://code.google.com/p/tesseract-ocr/downloads/list

for example: tesseract-ocr-3.02.eng.tar.gz and tesseract-ocr-3.02.por.tar.gz, then:
tar xf tesseract-ocr-3.02.eng.tar.gz
tar xf tesseract-ocr-3.02.por.tar.gz
(move the contents from tessdata_ocr to tesseract-3.03/tessdata)

Install and copy:
sudo make install-langs
sudo cp -r tessdata/* /usr/local/share/tessdata/

Add to ~/.bashrc:
export TESSDATA_PREFIX=/some/path/to/tessdata
(in this case: /usr/local/share/tessdata/)

and then (load the new config):
source ~/.bashrc

Training tools can be build and installed (after building of tesseract) with:
cd training/
make clean
cd ..
make training
sudo make training-install

Check installation:
tesseract --version

Done šŸ˜‰

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: