Skip to content

Tesseract install

markkerzner edited this page Jan 1, 2015 · 7 revisions

To have OCR capabilities, you need to install Tesseract.

Tesseract installation guide.

References: http://code.google.com/p/tesseract-ocr/wiki/ReadMe http://webcache.googleusercontent.com/search?q=cache:HoKkXbiESHkJ:ubuntuforums.org/showthread.php%3Ft%3D1647350+&cd=1&hl=bg&ct=clnk&gl=bg

1.) Install necessary libs:

sudo apt-get -y install autoconf automake libtool sudo apt-get -y install libpng12-dev sudo apt-get -y install libjpeg62-dev sudo apt-get -y install libtiff4-dev

we should have those, but in any case: sudo apt-get -y install gcc sudo apt-get -y install g++ sudo apt-get -y install automake

2.) Install Leptonica

2.1) Source code:

mkdir leptonica cd leptonica wget http://www.leptonica.org/source/leptonlib-1.67.tar.gz

2.2) Installation

tar -zxvf leptonlib-1.67.tar.gz cd leptonlib-1.67 ./configure make sudo make install sudo ldconfig

2.) Install Tesseract

2.1) Source code mkdir tesseract cd tesseract wget http://tesseract-ocr.googlecode.com/files/tesseract-3.01.tar.gz

2.2) Installation tar -zxvf tesseract-3.01.tar.gz cd tesseract-3.01 ./autogen.sh ./configure make sudo make install sudo ldconfig

3.) Install language data

Download: wget http://tesseract-ocr.googlecode.com/files/tesseract-ocr-3.01.eng.tar.gz

Decompress it ('tar xf tesseract-ocr-3.01.eng.tar.gz') Move it to installation of tessdata (e.g. 'mv tesseract-ocr/tessdata $TESSDATA_PREFIX' if defined, if not, the default dir is /usr/local/share/tessdata/)

Clone this wiki locally