sudo apt-get install autoconf automake libtool
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
wget http://www.leptonica.org/source/leptonica-1.73.tar.gz
atool -x leptonica-1.73.tar.gz
cd leptonica-1.73
./configure
make
make install
git clone https://github.com/tesseract-ocr/tesseract.git
cd tesseract
./autogen.sh
./configure
make
sudo make install
sudo ldconfig
mkdir/usr/local/share/tessdata
cd/usr/local/share/tessdata
wget https://github.com/tesseract-ocr/tessdata/archive/master.zip
unzip master.zip
cd tessdata-master
cp jpn.traineddata /usr/local/share/tessdata
cp eng.traineddata /usr/local/share/tessdata
export TESSDATA_PREFIX=
/usr/local/share/tessdata
test.jpgファイルをocrしてtest.txtが出力される
/usr/local/bin/tesseract test.jpg test -l jpn
コメント