Tue Nov 3 17:07:12 PST 2015

Compiling Tesseract 3.03 on Ubuntu 12.04 LTS

I decided to install Tesseract 3.03 on my Ubuntu box recently. (I wanted to have the text layer on my scanned PDFs correctly lined up with the underlying page image - Tesseract 3.03 does this.). So I downloaded the appropriate source and set about building.

I had to build and install leptonica first - I used version 1.72. There after, there was a problem with make in the tesseract 'api' directory. I resolved this by simply executing the required command by hand:

# /bin/bash ../libtool --tag=CXX   --mode=link g++     -o tesseract tesseract-tesseractmain.o libtesseract.la   -lrt  -lpthread /usr/local/lib/liblept.a

This is just the original line emitted by the Makefile with the location of the leptonica library (i.e. /usr/local/lib/liblept.a) corrected.

Thereafter everything was relatively straightfoward. I had to download the English 'trained' data from the appropriate site, and then tesseract was ready to use.


Posted by ZFS | Permanent link | File under: bash