Monday, February 7, 2011

How to set up tesseract-ocr from Google

You need the following library (Ubuntu):

# apt-get install libpng12-dev
# apt-get install libjpeg62-dev
# apt-get install libtiff4-dev
# apt-get install zlib1g-dev

Set up leptonica:

# wget http://www.leptonica.com/source/leptonlib-1.67.tar.gz
# tar xfz leptonlib-1.67.tar.gz
# cd leptonlib-1.67
# ./configure
# make
# make install

Setup tesseract-ocr (version 3.0):

# svn checkout http://tesseract-ocr.googlecode.com/svn/trunk/ tesseract
# cd tesseract
# ./configure
# make
# make install
# ldconfig -v

Testing tesseract-ocr:

# tesseract eurotext.tiff result

Check result:

# cat result.txt

Done.

No comments:

Post a Comment