Optical Character Recognition (OCR)
Turning images of text, from scanned pages to street signs and handwriting, into machine-readable characters.
Also OCR · text recognition · handwriting recognition · document AI · scene text
Taking a photo of a page and having the computer type out everything written on it, so you can search it, copy it or have it read aloud.
Where it fits
+All relationships as a list
How it works
OCR is one of the oldest success stories of machine learning. In the 1990s, LeNet-5-style CNNs were reading millions of handwritten bank cheques a day.
A modern OCR system has two jobs:
- Detection: find where the text is: lines on a page, a sign in a street photo.
- Recognition: turn each text region into a string of characters. Classic systems combined a CNN with a recurrent network (RNN) that reads features left to right; newer ones use Transformers.
Document AI goes further and understands layout: which numbers belong in which table cell, what is a header, the order in which columns should be read.
Increasingly, general vision-language models read text as part of understanding an image: ask about a receipt and they read the total directly. Dedicated OCR remains common where speed, cost and exact character accuracy matter.
Everyday use cases
- Case 01
Live Text and Google Lens
Copying a phone number from a photo of a poster, or translating a menu by pointing your camera at it.
- Case 02
Processing invoices
Pulling amounts, dates and supplier names out of scanned invoices automatically.
Famous examples
Strengths, weaknesses and when to use it
Strengths
- Mature and accurate for clean printed text; unlocks huge archives of paper documents.
Weaknesses
- Messy handwriting, unusual fonts, low light and complex layouts still cause errors.
When to use itAny time information lives in images of text: scans, photos, screenshots, forms.
Compare with
Check yourself
- Q01
Reading a sign in a street photo is harder than a scanned page because...
Show answer
A: Text appears at angles, in varied fonts and lighting