转:
Mac下Tesseract源码安装带训练库
Tesseract
项目地址:https://github.com/tesseract-ocr/tesseract
源码安装
说明:brew install --with-training-tools tesseract 训练工具安装失败用源码安装如下
1.先安装依赖
<code># Packages which are always needed. brew install automake autoconf libtool brew install pkgconfig brew install icu4c brew install leptonica # Packages required for training tools. brew install pango # Optional packages for extra features. brew install libarchive # Optional package for builds using g++. brew install gcc</code>
2.下载源码
https://github.com/tesseract-ocr/tesseract/releases
3.编译安装
<code>cd tesseract-4.1.1 ./autogen.sh mkdir build cd build # Optionally add CXX=g++-8 to the configure command if you really want to use a different compiler. ../configure PKG_CONFIG_PATH=/usr/local/opt/icu4c/lib/pkgconfig:/usr/local/opt/libarchive/lib/pkgconfig:/usr/local/opt/libffi/lib/pkgconfig make -j # Optionally install Tesseract. sudo make install # Optionally build and install training tools. make training sudo make training-install</code>
!!!注意看下执行conifgure的时候检查安装的依赖是否检查时生效 ,否则安装训练工具可能会失败!重点看下这些
<code>checking for pkg-config... [some valid path] checking for lept >= 1.74... yes checking for libarchive... yes checking for icu-uc >= 52.1... yes checking for icu-i18n >= 52.1... yes checking for pango >= 1.22.0... yes checking for cairo... yes [...]</code>
转:
Mac下Tesseract源码安装带训练库
【说明】:本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!