Open andrewperoramas opened 9 months ago
Hey,
It's a library rather than a application, so cargo run
doesn't work.
What happens when you run cargo test
?
You can also run some examples, for example cargo run --example low_level_ocr_full_page
extern crate leptess;
use leptess::{leptonica, tesseract};
use std::path::Path;
fn main() {
let mut api = tesseract::TessApi::new(None, "eng").unwrap();
let pix = leptonica::pix_read(Path::new("./r.png")).unwrap();
api.set_image(&pix);
let text = api.get_utf8_text();
println!("{}", text.unwrap());
}
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
I did cargo test in archlinux setup
This setup works in ubuntu wsl but not in my arch machine.
I've just tested in an arch linux container
podman container run --rm -it -v "$HOME/Documents/git/github.com/houqp/leptess/:/leptess:Z" docker.io/archlinux
pacman -Sy leptonica tesseract clang tesseract-data-eng rust screenfetch pkg-config
cargo test
works, and cargo run --example low_level_ocr_full_page
works.
You'll need to give me more information about the problem if I'm going to be able to help you
does versions matter? tesseract 5.3.4 , leptonica-1.84.1
Tried this in archlinux
I did a cargo run and
cargo run