(1)首先安装依赖的leptonica库:
wget http://www.leptonica.com/source/leptonica-1.72.tar.gz
tar -xvf leptonica-1.72.tar.gz
cd leptonica-1.72
./configure && make && make install
(2)编译tesseract了,所用版本 3.04,编译需要automake、libtool,直接用yum安装就可以了。
wget https://github.com/tesseract-ocr/tesseract/archive/3.04.00.tar.gz
mv 3.04.00 Tesseract3.04.00.tar.gz
tar -xvf Tesseract3.04.00.tar.gz
cd tesseract-3.04.00/
./autogen.sh
./configure
make && make install
(3)下载安装英文,中文繁体,中文简体 识别库。
wget --no-check-certificate https://github.com/tesseract-ocr/tessdata/raw/master/eng.traineddata
wget --no-check-certificate https://github.com/tesseract-ocr/tessdata/raw/master/chi_sim.traineddata
wget --no-check-certificate https://github.com/tesseract-ocr/tessdata/raw/master/chi_tra.traineddata
cp/mv *.traineddata /usr/local/share/tessdata/
参考:https://www.cnblogs.com/dajianshi/p/4932882.html