OCR
OCR: Optical character recognition: software that finds the letters in an image of text, such as a scan or a photo, and turns them into real text that you can select, search and copy.
Also called Optical character recognition, Text recognition.
To a computer, a scanned page is a photo: a grid of coloured dots. You see words. The computer sees pixels. OCR finds the words in the picture and turns them into text.
How OCR works
- Clean the image. The software straightens the page and raises the contrast between ink and paper.
- Find the layout. It finds the columns, the lines and the words.
- Recognize the text. Older engines matched one letter at a time. Modern engines use neural networks that read a whole line and guess each word in context.
- Write the result. The output is plain text, or a searchable PDF that keeps the page image and puts an invisible layer of text behind it.
Tesseract, a widely used open-source engine, shows the history in one project. Hewlett-Packard developed it from 1985 to 1994 and released it as open source in 2005. Google developed it from 2006 to 2017. Version 4 added a neural-network engine, and it now recognizes more than 100 languages.
Where you meet OCR
- On your iPhone. Live Text lets you select and copy text in a photo. It needs an iPhone XS or later with iOS 15 or later (Apple Support).
- In scanning apps and PDF editors. Many can run OCR on a scan to make a searchable PDF.
- In libraries and archives. Old books and newspapers are scanned and run through OCR so that people can search them.
Where OCR makes mistakes
- Poor scans. Blur, shadows, tilted pages and low resolution all cause errors.
- Hard text. Handwriting, old typefaces and rare scripts are harder to read.
- Busy layouts. Columns, footnotes, tables and captions can come out in the wrong order.
- Look-alike characters. "rn" can become "m", and 0 can become O. Nothing warns you when this happens.
Text PDF or scanned PDF?
A PDF can hold real text, or only pictures of its pages. To check which one you have:
- Try to select a word. If nothing selects, or the whole page highlights as one image, it is a scan.
- Search for a word you can see. If the search finds nothing, the PDF has no text layer.
A scan that already went through OCR has a text layer. You can select its text, but it can still contain recognition errors.
In Peel
You can share a text PDF to Peel and get a story, or a series of stories for a book-length PDF. Peel does not do OCR. A scanned PDF, whose pages are pictures of text, does not work. Peel shows a message that explains this instead of making a story. If the same document exists as a web page or an EPUB, share that instead. See PDF summaries.