Back to learn

What is OCR?

Optical character recognition, from pixels to characters, in a form you can actually explain to a colleague.

OCR stands for optical character recognition. It is the software task of turning an image of text into the underlying characters. When you scan a document and end up with a PDF you can search and copy from, OCR ran somewhere in between.

The three stages of OCR

  1. Image preparation: deskew, crop, threshold, and clean noise. A tilted or shadowy image costs the next stage points.
  2. Character recognition: a neural network trained on millions of characters guesses which glyph each region of pixels represents.
  3. Layout reconstruction: group characters into words, words into lines, lines into paragraphs and columns. This step is often harder than the recognition itself.

Why OCR fails

Bad lighting, low resolution, unusual fonts, handwriting, foreign scripts, tables with implicit column boundaries, and rotated pages. Modern engines handle each of these better than they used to, but none of them is a solved problem.

Neural OCR vs classical OCR

Classical OCR used template matching: compare the pixel region to known glyph templates and pick the closest. Neural OCR uses a convolutional or transformer network that has learned character shapes from data. Neural is more accurate on messy inputs and roughly equivalent on clean ones.

OCR in finance

Two use cases dominate: scanned bank statements and receipts. Statements are easier because the layout is regular; receipts are harder because layout varies by merchant and the paper itself is noisy. In both cases the output feeds a downstream extractor that pulls named fields (date, amount, merchant, total) out of the raw text.

What good looks like

On clean digital images, expect 99+ percent character accuracy. On typical smartphone photos of paper receipts, expect 92-97 percent. On low-quality scans of aged documents, expect anything from 70 to 90 percent. Any vendor quoting a single number for all inputs is oversimplifying.