public List <Item> ProcessReceiptImage(Bitmap image) { var receipt = _ocr.ConvertImage(image); var itemList = _dataConverter.ReceiptToItemList(receipt); _dataManager.SaveData(itemList); return(itemList); }
public Receipt FullReceiptCreating(Bitmap image) { var linesOfText = _ocr.ConvertImage(image); var date = GetDateForReceipt(linesOfText); var shop = _shopDetection.GetShopFromData(linesOfText.Take(4).ToList()); return(new Receipt { ReceiptDate = date, UpdateDate = DateTime.Today, Shop = shop, LinesOfText = linesOfText }); }
public List <Item> ProcessReceiptImage(Bitmap image) { if (image != null) { image = _imageFormating.FormatImage(image); var receipt = _ocr.ConvertImage(image); var itemList = _dataConverter.ReceiptToItemList(receipt); return(itemList); } else { return(null); } }