Skip to content
PDFLove

why is my ocr inaccurate

What OCR Gets Wrong, and How to Fix It

OCR is recognition, not conversion, so it has an accuracy rather than a result. Most of what determines that accuracy was decided before the file reached any software — at the scanner.

01

What OCR is doing

Optical character recognition takes an image of a page, finds the shapes that look like text, and decides which character each shape most resembles. Modern engines then check the result against a language model, which is why "rn" misread as "m" is often silently corrected in a real word and left alone in a product code.

That last point is the thing to understand. OCR is most accurate exactly where you need it least — ordinary prose, where context rescues it — and least accurate on serial numbers, account references, and figures, where there is no context to rescue anything and where an error costs the most.

02

What ruins accuracy

Resolution below 300 DPI. This is the single biggest factor. At 300 DPI a 10-point character is about 40 pixels tall and unambiguous. At 150 DPI it is 20 pixels and the engine is guessing between similar shapes. Scanning higher than 400 DPI rarely helps and makes everything slower.

Skew. A page scanned a couple of degrees off straight is much harder to read, because line detection assumes horizontal baselines. Two degrees is enough to matter and is easy to miss by eye.

Poor contrast. Faint photocopies, grey backgrounds, coloured paper, and highlighter over text all reduce the separation between ink and page that the engine depends on.

JPEG artefacts. Compressing a scan hard before running OCR smears the edges of characters. If you are going to do both, OCR first and compress afterwards.

Layout. Multi-column text, tables, sidebars and footnotes all require the engine to work out reading order before it reads anything, and getting that wrong scrambles otherwise perfect recognition.

03

What OCR will not do

Handwriting, in general. Recognising cursive is a substantially harder problem than recognising print, and general-purpose OCR does badly at it. Neat block capitals sometimes work.

Reconstruct a table properly. It can often read every cell correctly and still produce a structurally wrong table, because deciding where columns begin is a separate inference from reading the characters.

Recover information that is not there. If the scan is too faint for you to read a digit with certainty, no engine is going to do better — and unlike you, it will commit to an answer without flagging the doubt.

04

Getting a better result

Rescan if you can. Thirty seconds at 300 DPI, straight, in good contrast, beats any amount of post-processing on a bad scan. If the document is going to be relied on, this is time well spent.

Straighten before recognising. Even approximate deskewing recovers a lot on a page that was fed in crooked.

Convert to greyscale rather than aggressive black-and-white. Pure bilevel conversion at the wrong threshold eats thin strokes and closes up counters, and both hurt recognition.

Set the language. An engine expecting English on a German document will correct its way into confident nonsense.

Then check the output — specifically the numbers. Read the figures against the original rather than skimming the prose. That is where the errors that survive are hiding, and a misread digit looks entirely plausible on the page.

FAQ

Related questions

What accuracy should I expect from OCR?

On a clean 300 DPI scan of ordinary printed text, well above 99% of characters. On a faded photocopy, in tight columns, or below 200 DPI, it drops sharply — and the remaining errors cluster in exactly the places context cannot fix.

Should I compress before or after running OCR?

After. Compression works by discarding image detail, and the detail it discards first is fine edges — which is precisely what the recognition engine is reading. OCR first, then compress the result.

Can OCR read a photo taken with my phone?

Often, but less reliably than a scan. Phone photos bring uneven lighting, perspective distortion from holding the camera at an angle, and shadows. Flat on a table, in even light, shot straight down, a modern phone camera does fine.