微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Mac下Tesseract源码安装带训练库

转:

Mac下Tesseract源码安装带训练库

Tesseract

项目地址:https://github.com/tesseract-ocr/tesseract

源码安装

说明:brew install --with-training-tools tesseract 训练工具安装失败用源码安装如下

1.先安装依赖

# 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

2.下载源码

https://github.com/tesseract-ocr/tesseract/releases

3.编译安装

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

!!!注意看下执行conifgure的时候检查安装的依赖是否检查时生效 ,否则安装训练工具可能会失败!重点看下这些

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

[...]

转:

Mac下Tesseract源码安装带训练库

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐