1. 程式人生 > >Ubuntu14.04安裝tesseract3.0.5

Ubuntu14.04安裝tesseract3.0.5

參考網址https://medium.com/@lucas63/installing-tesseract-3-04-in-ubuntu-14-04-1dae8b748a32

https://github.com/tesseract-ocr/tesseract/wiki/Compiling#linux

https://lucacerone.net/2017/install-tesseract-3-0-5-in-ubuntu-16-04/

先安裝依賴庫:

Ubuntu

If they are not already installed, you need the following libraries (Ubuntu 16.04/14.04):

sudo apt-get install g++ # or clang++ (presumably)
sudo apt-get install autoconf automake libtool
sudo apt-get install pkg-config
sudo apt-get install libpng-dev
sudo apt-get install libjpeg8-dev
sudo apt-get install libtiff5-dev
sudo apt-get install zlib1g-dev

if you plan to install the training tools, you also need the following libraries:

sudo apt-get install libicu-dev
sudo apt-get install libpango1.0-dev
sudo apt-get install libcairo2-dev

下載安裝Leptonica

tar xvf leptonica-1.74.tar.gz
cd leptonica-1.74
./configure
make

sudo make install

sudo ldconfig

下載tesseract3.0.5

https://github.com/tesseract-ocr/tesseract/archive/3.05.00.tar.gz

解壓

./autogen.sh./configure--enable-debugmake        //LDFLAGS="-L/usr/local/lib"CFLAGS="-I/usr/local/include"makesudo make install//sudo make install-langssudo ldconfig

檢視是否安裝成功

 $:tesseract -v
tesseract 3.05.00
 leptonica-1.74.4
  libjpeg 8d (libjpeg-turbo 1.3.0) : libpng 1.2.50 : libtiff 4.0.3 : zlib 1.2.8

安裝語言包

https://github.com/tesseract-ocr/tessdata/archive/3.04.00.zip

下載語言包,3.0.4也適用於3.0.5;

解壓出來根據需要將語言包拷貝到 /usr/local/share/tessdata 下;