#tesseract #ocr #leptonica

leptess

Rust binding for Tesseract and Leptonica

14 releases (6 breaking)

new 0.7.4 Oct 13, 2019
0.6.1 Oct 8, 2019
0.6.0 Jul 6, 2019

#48 in Images

Download history 76/week @ 2019-06-30 39/week @ 2019-07-07 3/week @ 2019-07-14 16/week @ 2019-07-21 6/week @ 2019-07-28 36/week @ 2019-08-04 13/week @ 2019-08-11 10/week @ 2019-08-18 79/week @ 2019-08-25 53/week @ 2019-09-01 18/week @ 2019-09-08 48/week @ 2019-09-15 32/week @ 2019-09-22 78/week @ 2019-09-29 228/week @ 2019-10-06

211 downloads per month

MIT license

2MB
349 lines

Leptess

CircleCI Crates.io Docs

Productive and safe Rust bindings/wrappers for Tesseract and Leptonica.

Build dependencies

Make sure you have clang, Leptonica and Tesseract installed.

For Ubuntu user:

sudo apt-get install libleptonica-dev libtesseract-dev clang

You will also need to install tesseract language data based on your OCR needs:

sudo apt-get install tesseract-ocr-eng

Usage

let mut lt = leptess::LepTess::new(None, "eng").unwrap();
lt.set_image("path/to/page.bmp");
println!("{}", lt.get_utf8_text().unwrap());

For more examples, see docs and examples directory.

To run demos in examples directory, try:

cargo run --example low_level_ocr_full_page

Development

To run tests, you will need at Tesseract 4.x to match what we have in tests/tessdata/eng.traineddata. See CircleCI config to see how to replicate the setup.

Dependencies