How to check whether straightening a scan improves OCR

3 November 2026

A black flatbed scanner with its lid open.
Illustrative photograph. Resized with neutral margins. Photo: “Epson V850 scanner open 20230920.jpg” — Santeri Viinamäki / Wikimedia Commons. Original notice: © Santeri Viinamäki 2023 · CC BY-SA 4.0

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

OutcomeStraight controlSkewed scan
Character edits against the transcript016
Word edits against the transcript013
Required terms found4 of 40 of 4
Elapsed recognition time1.207 seconds0.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.

  1. Search for each marked term in the uncorrected output and record its exact spelling, including punctuation and leading zeroes.
  2. 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.
  3. 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).