https://txtfetch.com/glossary/dpi/
DPI (dots per inch)
A resolution unit for a scanned image, though a file's declared DPI can lie, so OCR depends on the text's pixel height, not the tag.
definition
DPI (dots per inch) is a measure of how many pixels a scanned image packs into each inch of the original physical page. This is the resolution the scan was captured at.
Also called: scan resolution, effective resolution
in-plain-terms
For OCR, what matters isn't the DPI a file declares. It's how tall the actual character shapes are in pixels once the image is decoded. That's what an OCR engine's line-finder and glyph classifier actually see. Tesseract's own documentation recommends at least 300 dpi for reliable results.
A file's declared DPI can be wrong in both directions. A phone photo often declares a low DPI, a leftover screen-resolution default, despite having plenty of real detail. An upscaled fax can declare a high DPI with the actual text only a handful of blurry pixels tall. The number that predicts OCR quality is the measured, effective one, not the declared one.
why-it-matters
- Catching a genuinely too-low-resolution scan before OCR saves an API call that would only produce garbled output. Missing it wastes a request and burns quota on unusable text.
- Downsampling a scan for a preview or thumbnail before OCR throws away exactly the pixel detail OCR depends on. Always OCR the full-resolution original.
how-to-check
- Measure an image's effective resolution directly from its pixels rather than trusting the declared DPI tag. Check an image's OCR readiness
related-terms
faq
- Can I trust a scanned file's declared DPI?
- Not on its own, since it can be wrong in both directions. A phone photo often declares a low DPI despite having plenty of real detail. An upscaled fax can declare a high DPI with the actual text only a few blurry pixels tall. The measured, effective resolution is what predicts OCR quality.
- What DPI does OCR actually need?
- Tesseract's own documentation recommends at least 300 dpi for reliable results. But that figure is about the text's real pixel size once decoded, not the number stamped in the file's metadata.
related-reading
See the term in real output.
Drop a file into the free reader and watch it happen.
Open the file reader →