1mod bounding_box;
2mod errors;
3mod ffi;
4mod image_input;
5mod ocr_engine;
6mod ocr_line;
7mod ocr_options;
8mod ocr_result;
9mod ocr_word;
10
11pub use bounding_box::BoundingBox;
13pub use bounding_box::Point;
14pub use errors::OneOcrError;
15pub use image_input::ImageInput;
16pub use ocr_engine::OcrEngine;
17pub use ocr_line::OcrLine;
18pub use ocr_options::{OcrOptions, Resolution};
19pub use ocr_result::OcrResult;
20pub use ocr_word::OcrWord;
21
22pub(crate) const ONE_OCR_MODEL_FILE_NAME: &str = "oneocr.onemodel";
23pub(crate) const ONE_OCR_MODEL_KEY: &str = r#"kj)TGtrK>f]b[Piow.gU+nC@s""""""4"#;
24
25macro_rules! check_ocr_call {
31 ($call:expr, $err_msg:literal) => {
32 let res = $call;
33 if res != 0 {
34 return Err($crate::errors::OneOcrError::OcrApiError {
35 result: res,
37 message: $err_msg.to_string(),
38 });
39 }
40 };
41}
42
43pub(crate) use check_ocr_call;