High level Rust binding for Tesseract and Leptonica.
On top of the vanilla C API, it adds the following features:
Make sure you have Leptonica and Tesseract installed.
For Ubuntu user:
bash
sudo apt-get install libleptonica-dev libtesseract-dev
Minimal example:
```rust let api = tesseract::TessApi::new(); api.init("eng");
let pix = leptonica::pixread(Path::new("path/page.bmp")).unwrap(); api.setimage(&pix);
println!("{}", api.getutf8text().unwrap());
api.destroy(); pix.destroy(); ```
For more examples, see examples
directory.
Regenerate capi binding:
make gen