Install Tesseract 3-03

Install Tesseract 3 – tested on Linux Mint Rebecca 17.1

Check 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:
tar -zxvf LEPTONICA_FILE.tar.gz
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.

sudo nano /etc/
include /usr/local/lib

Installing the 3.03 version
You can now build and install tesseract by running:

sudo make install
sudo ldconfig

Download the Tesseract-ocr language data package you want here:

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 šŸ˜‰


Leave a Reply

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

You are commenting using your 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: