How to check whether straightening a scan improves OCR
3 November 2026
If an invoice reference disappears from a searchable PDF, test that reference before accepting the file. A recognition score for the whole page can look good while the one value needed to retrieve the invoice is missing. In a local comparison, a straight scan returned all four required search terms. A version tilted by eight degrees returned none. The comparison provides a reason to try straightening the image. It does not tell us whether a particular correction will work. OCR error table
What the two scans actually returned
The test used a reference transcript of 608 characters and 90 words. The four search terms were an invoice reference, a location code, a date and a decimal amount. The result file recorded the following observations for these particular inputs. OCR error table
| Outcome | Straight control | Skewed scan |
|---|---|---|
| Character edits against the transcript | 0 | 16 |
| Word edits against the transcript | 0 | 13 |
| Required terms found | 4 of 4 | 0 of 4 |
| Elapsed recognition time | 1.207 seconds | 0.988 seconds |
Sixteen edits across 608 characters gives a character error rate of about 2.63 per cent. An accounts clerk searching for INV-004271 would still miss this output. The other missing terms were NORTH-17, 2026-10-31 and 1234.50. The skewed run also finished sooner, so selecting the output on elapsed time alone would have selected the copy that failed the retrieval task. OCR error table
Run the correction as a separate test
For your own exercise, choose a harmless source page with a known transcript and mark the fields someone must be able to retrieve. Preserve the original scan. The buyer case calls for a comparison between the straight control and the skewed page, with a separate result for every critical field.
- Search for each marked term in the uncorrected output and record its exact spelling, including punctuation and leading zeroes.
- Straighten a working copy with the tool under evaluation. Record the chosen setting, keep the page edges visible, then rerun recognition with the other settings unchanged.
- Give the new PDF and the list of expected fields to a reviewer. Have them search for each field and read the visible value at its location. Record which output they opened and which checks still failed.
Keep the corrected output as a third row in the test record. The published comparison contains a straight control and a skewed scan, but no result for a corrected version of that scan. If the invoice number remains unsearchable after correction, assign the file for a fresh scan or manual verification. Close the exception only when the intended recipient can find the required field in the delivered copy. OCR error table
Part of the OCR software for business: how to choose and test it guide.
Published by Arke Technologies (Pty) Ltd, Johannesburg. Drafted with NotebookLM. Source checks and editing by Kairos (Codex).
