Why OCR Misses Small, Faint Text: What We Measured on 10 Test Pages
You run a scanned page through OCR and the result looks half done. The big headings are there. The paragraphs underneath, the part you actually wanted, are missing or turned into nonsense. It is one of the most common complaints about OCR, and it is rarely the fault of the tool. It is usually the picture.
We wanted numbers rather than a guess, so we built a set of test pages, changed one thing at a time, and counted how many words came back correct.
How we tested
The test page is a small, ordinary-looking document: two bold black headings and two short sections of body text in light grey, about 460 pixels wide when drawn at its natural size, with 59 words in total. It looks a lot like a screenshot saved as a PDF or a low-quality export from a scanning app.
We drew the same page at five different resolutions, and again with the body text in five different shades of grey. Each version was read by Tesseract 4.1 through OCRmyPDF 13.4 in its forced mode. A word counted as correct only if it came back spelled exactly right.
We also ran each page through a second route that cleans it up first: render it large, turn every pixel black or white, then read it. That is the idea behind the Enhance option in our OCR PDF tool, and we will come back to it.
Finding 1: below about 150 dpi, small grey type disappears
| Page width in pixels | Same page as dpi | Words right, read as it is | Words right, after cleaning |
|---|---|---|---|
| 464 | 72 | 10 of 59 | 13 of 59 |
| 696 | 108 | 18 of 59 | 57 of 59 |
| 928 | 144 | 10 of 59 | 59 of 59 |
| 1,392 | 216 | 59 of 59 | 59 of 59 |
| 1,856 | 288 | 59 of 59 | 59 of 59 |
Read the middle of that table. At 144 dpi the page is perfectly readable to a person, yet the plain OCR got only 10 words, which is the two bold headings and little else. At 216 dpi the same page was read without a single mistake.
The jump is not gradual. It looks like a cliff, and the reason is the size of the letters. The grey body text on this page is only a few pixels tall at the low resolutions, and a letter that small has too few pixels left to tell an "e" from a "c".
The top row is worth noting too. At 72 dpi nothing helped, not even cleaning. When the letters are only a handful of pixels tall, the information is simply not in the file.
Finding 2: faint text is harder than black text
We kept the page at 144 dpi, which is the awkward middle, and changed only the shade of the body text.
| Body text shade (0 is black, 255 is white) | Words right, read as it is | Words right, after cleaning |
|---|---|---|
| 60, near black | 57 of 59 | 59 of 59 |
| 100, dark grey | 52 of 59 | 59 of 59 |
| 140, mid grey | 10 of 59 | 59 of 59 |
| 180, light grey | 10 of 59 | 42 of 59 |
| 210, very light grey | 10 of 59 | 10 of 59 |
Dark text survives a low resolution much better than light text. Once the grey passes the middle, plain OCR gives up, and at the lightest shade even the cleaned version cannot find the letters. If the printed original is that pale, the honest answer is to scan it again with the brightness turned down or the contrast turned up.
Finding 3: making the page black and white is what rescues it
On the 108 and 144 dpi pages, the cleaned route took us from a handful of words to nearly all of them. It is worth being precise about why, because we tried the obvious shortcuts first.
Simply enlarging the picture did not help. OCRmyPDF has an option that resamples the page to a higher resolution before reading, and in our test it made no difference (18 words, then 15, then 19 as we raised it). Its alternative thresholding methods changed nothing either, with the Tesseract version we used. More pixels without more detail is still a blur.
What worked was a stricter way of deciding what counts as ink. Faint text is a pale grey sitting close to the colour of the paper, and the reader's own idea of "dark enough" ignores it. When we forced the choice ourselves, anything even a little darker than the paper became black, the text suddenly had solid edges.
The cut-off matters, though. On a second low-resolution page with 67 words, we tried fixed cut-offs from 170 to 235 (every pixel at or below the number turns black):
| Cut-off | 170 | 185 | 195 | 204 | 215 | 225 | 235 |
|---|---|---|---|---|---|---|---|
| Words right of 67 | 16 | 33 | 52 | 59 | 54 | 53 | 43 |
Too low and the faint text is thrown away with the paper. Too high and the paper's own speckle turns into black dots that confuse the reader. The best results sat in a fairly wide band, which is encouraging, because it means the method does not need to be tuned for each file. We set the cut-off a fifth of the way from the paper colour towards the darkest ink on the page, with limits at both ends.
One method we tried first, Otsu's classic automatic threshold, did badly here. A page with black headings and light grey body text splits into "black" and "everything else", so the grey text is filed with the paper. It scored worse than doing nothing. We mention it because it is the first thing most people reach for.
What this means for your own scans
- Check the resolution before you blame the tool. If your scan app has a quality setting, choose the highest one, or aim for 200 to 300 dpi. A page that is only 500 to 700 pixels wide will struggle with anything small.
- Letter size matters as much as dpi. Large black type can be read at low resolution; small grey print cannot. Footnotes, stamps and the fine print on forms are the first things to go.
- Do not trust a screenshot. A page saved from a phone screen or a chat app has often been shrunk and compressed. Find the original file if you can.
- Look at the picture, not only the result. Zoom in to 200 percent. If you cannot read a line comfortably, the reader will not manage it either.
- Keep the original. If you clean a page, the result is a new file. Your untouched scan is still the record.
Where the Enhance option fits
The OCR PDF tool has an option called Enhance low-quality scans. It is off by default, and it is aimed at exactly the zone in the tables above: small, faint or low-resolution pages that come back with little or nothing. It redraws each page larger, turns it black and white as described, and then reads it.
It comes at a cost that you should weigh. Colour and shading are gone, because every page is rebuilt from the cleaned picture. It also takes longer, and it will not rescue a page where the letters are only a few pixels tall. For a normal, sharp scan you do not need it, and you should leave it off.
The limits of this test
This is one page layout, one typeface, one OCR engine version and one family of fake scans, so read it as a pattern, not a law. Real scans add skew, shadows from a thumb, creased paper and photographs of printed text, and all of those make the numbers worse. Other engines and other versions of Tesseract may behave differently. We published the figures because they show the shape of the problem clearly, and because they make it easy to repeat the test with your own file.
If you try the Enhance option on a page of your own and it does not help, the most likely explanation is the one in the first row of the first table: the detail was never captured. In that case the fix is a new scan, not a better tool.
Frequently asked questions
What resolution does OCR need?
It depends on the size of the letters, not on a magic number. In our tests, small grey type failed at 144 dpi and read perfectly at 216 dpi, while larger black type was read well even at 100 dpi.
Will upscaling a small image make OCR work?
Not by itself. Enlarging a picture adds pixels but no new detail. In our tests it only helped once the faint text was also turned to solid black.
Is it safe to turn pages black and white?
It is a trade. The words come back, but colour, shading and any photos on the page are lost, so keep the original file and use this only for pages that would otherwise give you nothing.
Try it
Open the OCR PDF tool and read your scan as it is first. If the result is thin, run it again with Enhance low-quality scans switched on, and compare the two.