tesseract的一个c++版本demo

Tesseract Example

Building

Before building take a look at cppan.yml file. Create a local copy of it in your project structure.

务必安装cppan。其实就是直接下载下来放到环境变量里面。

Windows

Prerequisites:

  1. Download git, cmake and add them to PATH(三个软件缺一不可)
  2. Download the latest CPPAN (https://cppan.org/) client from https://cppan.org/client/
  3. Add cppan to PATH too.
  4. 需要安cmake,cmake是一个工具,能够生成与平台无关的makefile,在windows底下能够生成一个vs的工程,直接编译即可
git clone https://github.com/cppan/tesseract_example tesseract_example
cd tesseract_example/with_cmake
cppan
mkdir build && cd build
cmake ..
cmake --build . --config Release
用vs打开.sln文件,在工程里面就可以修改代码。然后编译链接成exe。

Linux

Prerequisites:

  1. Install git, cmake, the latest CPPAN (https://cppan.org/) client.
  2. Run
git clone https://github.com/cppan/tesseract_example tesseract_example
cd tesseract_example/with_cmake
cppan
mkdir build && cd build
cmake ..
make -j4

Testing

  1. Download tesseract english data to tessdata dir near the main binary.(在这需要下载个训练好的文件)
  2. Copy test image img/phototest.tif
  3. Run main phototest.tif


 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值