参考地址:https://github.com/tesseract-ocr/tesseract
https://github.com/tesseract-ocr/tesseract/wiki/Compiling#linux
https://launchpad.net/~alex-p/+archive/ubuntu/tesseract-ocr?field.series_filter=xenial
安装
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:alex-p/tesseract-ocr
sudo apt-get update
sudo apt-get install tesseract-ocr
依赖:
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
apt-get install zlib1g-dev
training 依赖:
sudo apt-get install libicu-dev
sudo apt-get install libpango1.0-dev
sudo apt-get install libcairo2-dev
leptonica http://www.leptonica.org/ ?安装tesseract4.0需要从leptonica源码编译? https://github.com/danbloomberg/leptonica
sudo apt-get install libleptonica-dev # ????
sudo apt install cmake
使用源码
git clone https://github.com/danbloomberg/leptonica
cd leptonica
mkdir build
cd build
cmake ..
make
安装:
git clone https://github.com/tesseract-ocr/tesseract.git
cd tesseract
./autogen.sh
./configure
make
make install
ldconfig