Sunday, May 8, 2016

Tessaract OCR installation

I have been trying to install Tesseract in non standard folder on linux x86_64 but run into several issues.

Finally I was successfully able to install it after the following steps:

1. First install the following libraries in standard location
    yum install gcc libtool automake gcc-c++ gtk2 pango libicu-devel  pangomm-devel
    yum install pangomm cairo-devel pango-devel libjpeg-devel libpng-devel libtiff-devel zlib-devel
    yum install clang++ aclocal libtool autoconf
2. Install leptonica 1.73
    Download from http://www.leptonica.com/source/leptonica-1.73.tar.gz
    gunzip leptonica-1.73.tar.gz
    tar -xvf leptonica-1.73.tar
    cd leptonica-1.73
   ./configure
    make
    make check
    make install
3. Install Tesseract 3.04.01
    Download the tesseract from https://github.com/tesseract-ocr/tesseract/archive/3.04.01.tar.gz
    I will be installing in /apps/tesseract30401
    gunzip tesseract-3.04.01.tar.gz
    tar -xvf tesseract-3.04.01.tar
    cd tesseract-3.04.01
    ./autogen.sh
    ./configure --prefix=/apps/tesseract30401
    make
    make check
    make install
4. Install Tesseract 3.04.01 training
    Download the tessdata from https://github.com/tesseract-ocr/tessdata/archive/3.04.00.tar.gz
    tar -xzf tesseract-ocr-3.04.00.tar.gz -C /apps/tesseract30401/share
    mv /apps/tesseract30401/share/tessdata-  /apps/tesseract30401/share/tessdata
    cd tesseract-3.04.01
    make training
    make training-install
 
   Fixing bug  #258
   ln -s /usr/local/lib/liblept.so.5.0.0 /apps/tesseract30401/lib/liblept.so.5






No comments:

Post a Comment

Please feel free to post your queries here