Last active
July 16, 2020 07:13
-
-
Save emprit1988/4261ccca57430b0af10078130bad8ccb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##Install Prerequisites | |
sudo apt-get install g++ # or clang++ (presumably) | |
sudo apt-get install autoconf automake libtool | |
sudo apt-get install autoconf-archive | |
sudo apt-get install pkg-config | |
sudo apt-get install libpng12-dev | |
sudo apt-get install libjpeg8-dev | |
sudo apt-get install libtiff5-dev | |
sudo apt-get install zlib1g-dev | |
## If you get any problem with unmet dependencies. Run sudo apt-get -f install and sudo apt-get update | |
## Install Training Tools | |
sudo apt-get install libicu-dev | |
sudo apt-get install libpango1.0-dev | |
sudo apt-get install libcairo2-dev | |
## Install recent version of Leptonica (image processing library) | |
wget http://www.leptonica.com/source/leptonica-x.xx.x.tar.gz | |
## Unpack, make and install leptonica | |
tar xvf leptonica-1.74.tar.gz | |
cd leptonica-1.74 | |
./configure | |
make | |
sudo make install | |
## Download Tesseract from Git | |
./autogen.sh | |
$ ./configure --enable-debug LDFLAGS="-L/usr/local/lib" CFLAGS="-I/usr/local/include" | |
$ make | |
$ sudo make install | |
$ sudo ldconfig | |
$ make training | |
$ sudo make training-install | |
## Download Desired training data | |
https://github.com/tesseract-ocr/tessdata | |
## Move the file to tesseract path | |
/usr/share/ <depends on distro> | |
tesseract -v ## shows version and available packages | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment