#tesseract #async-api #methods #tokio #language #tesseract-api #tesseract-ocr

rusttesserast

A simple library providing the asynchronous methods for tesseract api

7 releases

0.0.2 Nov 27, 2023
0.0.1 Nov 22, 2023
0.0.1-alpha.4 Nov 21, 2023

#410 in Images

Download history 2/week @ 2024-02-22 10/week @ 2024-02-29 77/week @ 2024-03-07 1/week @ 2024-03-14

90 downloads per month

MIT license

480KB
283 lines

Rusttesserast

Crates.io Documentation

logo

Overview

rusttesserast is a simple library providing the asynchronous methods for tesseract api in Rust. See documentation for more.

Usage

Add this to your Cargo.toml:

[dependencies]
rusttesserast = "0.0.2"
use rusttesserast::tess_lib::TesseractApi;

#[tokio::main]
async fn main() {
    let mut tesseract_base = TesseractApi::new(Some(TesseractApi{dpi: 3, psm:3, ..Default::default()}), Some(String::from("/usr/local/share/tessdata").as_str()), Some(String::from("eng").as_str())).unwrap();
    let image_array = vec!["/workspaces/rusttesserast/tests/test_img.png", "/workspaces/rusttesserast/tests/test_img.png"];
    let test = tesseract_base.recognize_doc(None, None, image_array, "txt", None).await;
}
use rusttesserast::tess_lib::TesseractApi;

#[tokio::main]
async fn main() {
    let mut tesseract_base = TesseractApi::new(Some(TesseractApi{dpi: 3, psm:3, ..Default::default()}), Some(String::from("/usr/local/share/tessdata").as_str()), Some(String::from("eng").as_str())).unwrap();
    let image_array = vec!["/workspaces/rusttesserast/tests/test_img.png", "/workspaces/rusttesserast/tests/test_img.png"];
    let test = tesseract_base.recognize_doc(Some(String::from("test/save/path").as_str()), Some(String::from("test_data_file.txt").as_str()), image_array, "tsv", Some(true)).await;
}

License

Licensed under MIT license.

Dependencies

~7–17MB
~207K SLoC