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
use crate::reciept::Reciept;
use rusty_tesseract::{Args, Image};

pub trait Tesseract {
    fn apply(&mut self);
}

impl Tesseract for Reciept {
    fn apply(&mut self) {
        let img = Image::from_dynamic_image(&self.image).unwrap();
        let default_args = Args::default();
        let output = rusty_tesseract::image_to_string(&img, &default_args).unwrap();

        self.text = output;
    }
}