grocery-to-json 0.0.3

Convert images of reciepts to jsons
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use grocery_to_json::{aldi::Aldi, imageproc::ImageProc, reciept::Reciept, tesseract::Tesseract};
use image::ImageReader;

fn main() {
    let mut test: Reciept = ImageReader::open("./test.jpg").unwrap().try_into().unwrap();

    test.crop_gray();
    test.otsu(1);
    let _ = test.image.save("sample.png");

    test.apply();
    println!("{}", test.text);

    let wow: Aldi = test.try_into().unwrap();
    let res = serde_json::to_string_pretty(&wow).unwrap();
    println!("{}", res);
}