cloud.tencent.com/developer/a…
blog.csdn.net/weixin_5175…
注:这时有可能会报 configure: error: Leptonica 1.74 or higher is required. Try to install libleptonica-dev package.
解决方法:
(1)加入环境变量
vim /etc/profile
在最后插入
export LD_LIBRARY_PATH=$LD_LIBRARY_PAYT:/usr/local/lib
export LIBLEPT_HEADERSDIR=/usr/local/include
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
Error in pixReadMemTiff: function not present解决办法
作者:时鹏亮 | 更新时间:09/09/2019 08:08:50
tesseract执行时出现这种提示,通常是leptonica编译安装的时候,缺少部分lib,比如libtiff。
我出现提示是在Amazon Linux AMI release 2018.03的系统中,解决方案也很简单:
yum install libtiff-devel libjpeg-devel libpng-devel -y
装完之后,再重新编译安装一下leptonica即可。
//设置训练库的位置
String lagnguagePath = "/usr/local/share/tessdata";
instance.setDatapath(lagnguagePath);