Tesseract编译

来源:互联网 发布:脚本语言与c语言语法 编辑:程序博客网 时间:2024/06/14 22:52

For some reason 需要编译一下最新版本的Tesseract。目前最新的是4.0 alpha。

1. 获取Leptonica。直接在Leptonica官方网站下载最新的1.7.4-1版本的代码,CMake编译即可。

2. Tesseract的代码已经从google code托管到github上了,地址为:

https://github.com/tesseract-ocr/tesseract
3. 搜索 cppan,并从官网下载cppan.exe。为了方便起见,可以将cppan的路径放置在PATH中。
4. 进入Tesseract目录,执行 cppan。等待从网上下载需要的库。
5. 在Tesseract目录中创建Build目录,使用CMake进行Tesseract的编译。
6. 编译Tesseract时,提示错误,修改为:
static const STRING kCharsToEx[] = { "'", "`", "\"", "\\", ",", ".", "" };
即可。原因是中文字符不认识。删除中文字符。
7. Finish & enjoy.

0 0
原创粉丝点击