mac 使用tesseract识别图片中的中文

 

安装 tesseract
brew install tesseracthtml

 

加入环境变量
export TESSDATA_PREFIX=/usr/local/Cellar/tesseract/4.1.0/share/tessdatapython

 

查看安装位置
bogon:verify macname$ brew list tesseract
/usr/local/Cellar/tesseract/4.1.0/bin/tesseract
/usr/local/Cellar/tesseract/4.1.0/include/tesseract/ (19 files)
/usr/local/Cellar/tesseract/4.1.0/lib/libtesseract.4.dylib
/usr/local/Cellar/tesseract/4.1.0/lib/pkgconfig/tesseract.pc
/usr/local/Cellar/tesseract/4.1.0/lib/ (2 other files)
/usr/local/Cellar/tesseract/4.1.0/share/tessdata/ (22 files)
/usr/local/Cellar/tesseract/4.1.0/share/tessdata.bak/ (35 files)git

 

pip3.7 install pytesseractgithub

 

连接: https://pan.baidu.com/s/13Ywyn3GKziEjZG307zDFjQ 提取码: ptkc spa

下载后,用tessdata替换/usr/local/Cellar/tesseract/4.1.0/share/tessdata/.net

 

而后运行generate.pycode

bogon:verify macname$ python3 generate.py 3. 甲 方 所 代 理 的 金 融 公 司 通 颊 差 , 甲 方 向 乙 方 又 付 客 广 交 ( 备 泞 : 此 点 莪 口 因 平 台 点 荞 4. 双 方 坝 御 月 20 门 前 确 认 上 欢 项 汇 到 乙 万 指 定 的 帐 户 上 。

 

 

 

参考:htm

https://www.cnblogs.com/zhangxinqi/p/9297292.html#_label3
http://www.liangchan.net/soft/softdown.asp?softid=11126
https://www.bbsmax.com/A/GBJrZgQKJ0/
https://bbs.csdn.net/topics/392409466
https://github.com/tesseract-ocr/tesseract/wiki
https://blog.csdn.net/a745233700/article/details/80175883
https://www.cnblogs.com/chenyanbin/p/10398685.html
https://yq.aliyun.com/articles/330275
https://blog.csdn.net/weixin_33991418/article/details/90187385
https://www.cnblogs.com/xuchunlin/p/9415620.htmlblog

相关文章
相关标签/搜索