Exemple #1
0
        public List <Item> ProcessReceiptImage(Bitmap image)
        {
            var receipt  = _ocr.ConvertImage(image);
            var itemList = _dataConverter.ReceiptToItemList(receipt);

            _dataManager.SaveData(itemList);
            return(itemList);
        }
Exemple #2
0
        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
            });
        }
Exemple #3
0
 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);
     }
 }