Image glossary

OCR

Also known as optical character recognition, image to text

OCR is the process of detecting and transcribing text from an image into machine-readable characters.

What it does

An OCR engine locates regions of an image that contain text, works out the layout and reading order, segments those regions into lines and characters, and classifies each shape against a model of what letters look like. Modern engines use neural networks and recognise whole words in context rather than isolated glyphs, which is why they cope with joined and slightly damaged type.

The output is text plus, usually, a confidence score and the position of each word — which is what allows a searchable PDF to keep the original page image and put an invisible text layer behind it.

What decides accuracy

Resolution first. 300 DPI is the practical floor for reliable recognition; below that, character shapes break down and accuracy falls off sharply. A photograph of a document taken from too far away is the usual cause of a poor result.

Then contrast and evenness. Shadows across a page, a phone's own shadow, and uneven lighting all confuse the thresholding step that separates ink from paper. Flattening and de-shadowing a document photograph before recognition often improves the result more than any engine setting.

Then geometry. Skew and perspective distortion — the trapezoid you get photographing a page at an angle — degrade line detection. Straightening first is worth more than it sounds.

Finally the type itself. Clean printed text in a common typeface is close to solved. Handwriting, decorative faces, dense tables and text over photographs remain genuinely hard.

Why it beats upscaling for documents

Asked to enlarge illegible small text, an AI upscaler produces sharp, confident and wrong letters. It has learned what text looks like, not what your text says, and the output invites you to read fabricated characters.

OCR fails differently and better: it returns low-confidence results and misrecognised characters that a human can check against the image. When you need the words out of a low-resolution document, extract them rather than enlarging them.

Tools that work with this

Back to the full glossary.