Linux环境下Python使用tesseract-ocr4.0

Linux环境下Python使用tesseract-ocr4.0

https://blog.csdn.net/qq_37781464/article/details/89702993

注意安装报错处理:

https://blog.csdn.net/u014359108/article/details/108343787

下载语言包

https://codechina.csdn.net/mirrors/tesseract-ocr/tessdata?utm_source=csdn_github_accelerator

安装中英文语言包
下载chi_sim.traineddata、eng.traineddata、eng.traineddata.part三个文件,并把它们放到tessdata文件夹中。

cp chi_sim.traineddata /usr/local/share/tessdata
cp eng.traineddata /usr/local/share/tessdata
cp eng.traineddata.part /usr/local/share/tessdata

历史记录,参考:



pip install opencv-python
yum install pip
yum update python
yum -y install epel-release
yum -y install https://centos7.iuscommunity.org/ius-release.rpm
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum install epel-release
yum install python36
pip3  install opencv-python
pip3 install skbuild
pip3 install scikit-build
pip3  install opencv-python
pip3 install cmake
pip3  install opencv-python
yum install   -y build-essential
yum install gcc-c++
pip3  install opencv-python  -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
pip3 install --upgrade pip
pip3  install opencv-python  -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
ls -ltr 
pip3 install aircv
python3 adb_python.py
pip3 install matplotlib

ls -ltr
python 555.py 
pip3 install opencv-contrib-python
yum install -y libpng-devel libjpeg-devel libtiff-devel
wget http://www.leptonica.org/source/leptonica-1.78.0.tar.gz
tar -xzvf leptonica-1.78.0.tar.gz
cd leptonica-1.78.0
./configure
make
make -j4
make install
echo $?
cd /opt
wget https://codeload.github.com/tesseract-ocr/tesseract/tar.gz/4.0.0
ls
ls -ltr
mv 4.0.0  4.tar.gz
tar zxvf 4.tar.gz
cd tesseract-4.0.0/
ls
./autogen.sh
yum install bail_out
yum install automake -y
yum install libtool -y
./autogen.sh
./configure
pkg-config --version
yum install pkgconfig
vim /etc/profile
source /etc/profile
./configure
make  -j3
echo $?
make  install
cd tesseract-4.0.0/ 
ldconfig
tesseract --version
tesseract --list-langs
find / -name  tessdata
find . -name  tessdata
ls /usr/local/share/tessdata/
ls tessdata/
mv /usr/local/share/tessdata /usr/local/share/tessdata_1
cp -rf tessdata /usr/local/share/
find . -name  tessdata
tesseract --list-langs
cd /usr/local/share/
mv tessdata tessdata_111
wget https://github.com/tesseract-ocr/tessdata/raw/master/eng.traineddata
wget https://tesseract-ocr.googlecode.com/files/eng.traineddata.gz
wget https://github.com/tesseract-ocr/tessdata/raw/master/eng.traineddata
vim /etc/profile
source /etc/profile
ls  /usr/local/share/tessdata/eng.traineddata
tesseract bigmap_black_1.jpg  11

二、GitHub开源:支持100多种语言的OCR文字识别

https://github.com/tesseract-ocr/tesseract/blob/master/

DOCKERFILE

https://github.com/tesseract-ocr/tesseract/blob/master/Dockerfile


 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

追光叶子

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值