https://txtfetch.com/glossary/ocr/
OCR (optical character recognition)
Reading the shapes of characters in a picture of text and outputting real characters. It is the only route into a page that has no text layer at all.
definition
Optical character recognition (OCR) is the process of recognizing individual character shapes in a raster image and converting them into machine-readable text.
Also called: optical character recognition, OCR fallback
in-plain-terms
OCR looks at pixels, not codes. It segments an image into lines, then words, then individual glyph shapes. Each shape is matched against a trained model of what a character looks like. This is the only way to get text out of a scan, a fax, or a photographed page. Those files never had character codes to begin with, only a picture of one.
txtfetch runs Tesseract for this. Every image upload always gets OCR'd. A PDF only escalates to OCR when its first, plain-text extraction pass comes back entirely blank. See the caveat about mixed documents on the pdf-extracts-no-text fix page. A digital cover page ahead of a scanned body doesn't trigger it automatically.
why-it-matters
- OCR accuracy depends heavily on image quality. Resolution, focus, skew, and contrast all affect it. That's why the same recognizable page can OCR cleanly or produce garbage, depending on how it was scanned.
- OCR is not speech-to-text. It reads visible characters in an image, and has nothing to do with audio.
how-to-check
- Check whether a scan is likely to OCR cleanly before spending a request on it. Resolution, blur, and skew are all measurable from the image itself. Check OCR readiness
- Look for metadata.ocr: true in a txtfetch response to confirm OCR actually ran on that request.
related-terms
faq
- Does OCR run on every request?
- Every image upload always gets OCR'd. A PDF only gets OCR'd automatically when its first, plain-text extraction pass comes back entirely blank. A mixed document with a digital cover page ahead of scanned pages doesn't trigger it on its own.
- Is OCR the same as speech-to-text?
- No. OCR reads visible character shapes in an image. It has nothing to do with audio; transcribing speech is a separate technology entirely.
related-reading
See the term in real output.
Drop a file into the free reader and watch it happen.
Open the file reader →