标签:markdown min centos7安装 文件 依赖库 tesseract zip chmod ref
python 环境
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
chmod o+x Miniconda3-latest-Linux-x86_64.sh
pip install Pillow
pip install pytesseract
pip install xlwt
pip install requests
安装centos系统依赖
yum install -y automake autoconf libtool gcc gcc-c++
yum install -y libpng-devel libjpeg-devel libtiff-devel
安装leptonica
wget http://www.leptonica.org/source/leptonica-1.72.tar.gz
tar xvzf leptonica-1.72.tar.gz
cd leptonica-1.72/
./configure
make && make install
安装tesseract-ocr
wget https://github.com/tesseract-ocr/tesseract/archive/3.04.zip
unzip 3.04.zip
cd tesseract-3.04/
./configure
make && make install
ldconfig 报错:error while loading shared libraries: libtesseract.so.3
部署模型
安装requirements.txt中的python依赖库
pip install -r requirements.txt
在/usr/local/share/tessdata创建eng.user-patterns写入
\n\n\n\n\n\n
表示识别6位字符(或数字)
在/usr/local/share/tessdata/configs创建myconfig写入
#识别白名单
tessedit_char_whitelist abcdefghijklmnopqrstuvwxyz0123546789
#用户正则模式匹配
user_patterns_suffix user-patterns
标签:markdown min centos7安装 文件 依赖库 tesseract zip chmod ref
原文地址:https://www.cnblogs.com/maoxianfei/p/9901730.html