centos安装Tesseract

 ̄綄美尐妖づ 提交于 2019-11-26 20:45:54

yum安装(推荐)

 yum search tesseract
 yum install tesseract.x86_64 -y 
 pip3 install pytesseract
 pip3 install Pillow
 yum install -y libpng12-devel.x86_64 - libtiff-devel.x86_64  zlib-devel.x86_64 
 

  

#使用测试

 图片

[root@localhostreuest]#tesseract  1.png  out
Tesseract Open Source OCR Engine v3.04.00 with Leptonica
[root@localhostreuest]#cat out.txt 
2765

  

编译安装

#下载包
wget https://github.com/tesseract-ocr/tesseract/archive/4.0.0.tar.gz
wget http://www.leptonica.org/source/leptonica-1.77.0.tar.gz


#解压安装leptoinica
tar xf leptonica-1.77.0.tar.gz
cd leptonica-1.77.0
 ./configure
 make && make install
 yum install automake libtool -y
 
 #安装tesseract
 cd tesseract-4.0.0/
./autogen.sh
./configure
./configure --with-extra-includes=/usr/local/include --with-extra-libraries=/usr/local/include

#pip3安装 Pillow pytesseract

  

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!