A sales receipt held by hand at an angle on top of a refund form

OCR or AI: to read a receipt, you first have to find it

Extracting text from a high-resolution image costs 10 to 20 times more with an AI model than with traditional optical character recognition (OCR). On paper, the choice is easy. But while building a cash report application for retail, we found that price per image is the wrong measure. The right measure is what it costs to get the right data, under real-world conditions.

OCR reads characters, not documents

OCR turns pixels into letters, and it does that well. Give it a scanned page — straight, well lit, on a white background — and the text comes out almost perfect.

But a cash report doesn't need text. It needs data: the merchant, the date, the subtotal, the taxes, the total, the payment method. And OCR has no idea which of the twelve printed amounts is the total. It returns words and their coordinates; it's up to you to rebuild the meaning from position. "The amount to the right of the word TOTAL, on the same line." As long as the line is straight, that works.

The perfect receipt doesn't exist

Cash report receipts don't go through an office scanner. They're photographed with a phone at the end of a shift, often between two tasks. Every photo comes with its own problems, and each one breaks the spatial reasoning OCR depends on.

  • Positioning. The receipt isn't centred: it sits in a corner of the image, or runs off the edge. Before you can read it, you have to find it.
  • Angle. The photo is taken at a slant, and perspective distorts the receipt. "The same line" no longer means anything: the amount to the right of TOTAL ends up level with the sales tax.
  • Background. A counter, a printed checkout mat, another sheet of paper underneath. OCR sees characters in it, or mistakes the edges of the receipt for the surroundings.
  • The paper itself. Thermal paper gets crumpled, folded, faded. Shadows and glare do the rest.

Each problem has a well-known technical fix: edge detection, deskewing, perspective correction, background removal. But each fix is a processing step to write, tune and maintain, with edge cases you only discover once reality hits.

Three receipts in one photo

Then comes the hardest case. To save time, the employee lines up three receipts on the counter and takes a single photo. That's perfectly reasonable.

For OCR, it's a puzzle. It reads left to right, and lines from neighbouring receipts get tangled: the merchant from the first, the date from the second, the total from the third. You first have to segment the image — detect each receipt, crop it, straighten it — before reading can even begin. When two receipts touch, even that step becomes unreliable.

You could forbid the practice, of course. But an instruction that goes against a natural habit won't be followed. The tool has to adapt to the way people work, not the other way around.

What AI does differently

A vision model doesn't rebuild a document from isolated characters. It looks at the whole image and understands what's in it: three receipts, on a counter, slightly tilted. It ignores the background. It knows a total usually sits near the bottom, after the taxes, and isn't to be confused with the amount tendered or the change given.

Above all, you don't ask it for text: you ask it for a structure — a list of receipts, each with the fields the report needs. Positioning, angle, background and separating the receipts are no longer steps to program; the model absorbs them.

The development gap is considerable. On one side, an image-processing pipeline and positioning rules that grow with every new receipt format. On the other, a clear definition of the expected data and validation rules. The second is built in days rather than weeks, and doesn't fall apart when a supplier changes its invoice template.

So what about the price?

Paying 10 to 20 times more per image is still a fact. But it needs perspective: AI solves computer vision problems that traditional approaches struggle with. At a few hundred receipts a day, the cost difference stays small compared with the time someone would spend fixing a botched entry.

When AI is the right call

AI isn't always the right choice, but it clearly is when several of these conditions come together:

  • You don't control the capture. Images come from phones, employees or customers, with lighting and framing nobody standardizes.
  • Layouts vary. Dozens of merchants, terminals and suppliers, each with its own template.
  • One image can hold several documents. Receipts side by side, overlapping pages, a slip stapled to an invoice.
  • You need meaning, not text. Telling the total from the subtotal, recognizing a tax, matching an amount to its payment method.
  • Volume is moderate. Hundreds or thousands of documents a day, where the price gap stays marginal next to manual processing.
  • Development time matters. You want a solution in production quickly, without a dedicated team to maintain it.

When OCR is still the right tool

Conversely, traditional OCR still makes perfect sense when you control the source: a fixed scanner, a single stable document format, volumes counted in millions of pages, or a simple need for raw text for archiving. It also remains a solid option when documents can't leave your servers.

The two approaches can also work together: OCR for clean, predictable documents, AI for the ones that fail validation. That's what we put in place for our client.

Trust, but verify

A receipt has a rare advantage: it checks itself. The subtotal plus taxes must equal the total; GST and QST must match the rates in effect; the date must fall within the report period. These simple checks catch the vast majority of reading errors, and send the doubtful receipt to a human instead of throwing off the cash count.

Where no check of that kind is possible, you can have the document read by two different AIs. Either way, the principle is the same: AI doesn't replace verification, it replaces data entry.

Do you have receipts, invoices or slips that end up being keyed in by hand, and an OCR that can't keep up? Let's look at what would work for you. Let's talk.

Frédéric Brabant

All articles