Document & Text Intelligence

OCR Table Mistakes: Find and Fix Low-Confidence Cells

Why OCR turns 105 into 1O5, how the amber cells show uncertain words, how to check a cell on the image, fix the layout, and when the black and white option helps.

PerkTonic Team4 min read
Cover of the guide "OCR Table Mistakes: Find and Fix Low-Confidence Cells"

OCR reads letters from a picture, and in a table of numbers its typical mistake is to read a digit as a similar letter: 105 becomes 1O5. The result looks almost right, which is why it is easy to miss. The amber marks of the Scanned Table to Spreadsheet tool show the uncertain cells, so you can check them against the image and correct them before you export.

Why OCR misreads characters

OCR does not understand a table. It looks at the shapes in the picture and chooses the most likely character for each one. Some shapes are almost the same: the digit 0 and the letter O, the digit 1 and the letter l, S and 5, B and 8. When the picture is blurred, small or poorly lit, the difference disappears, and the program has to guess.

Where the guess is poor, the tool reports low confidence. A word with a confidence below 70 out of 100 is shown in amber, and so is the cell that contains it. This is the signal to look at the cell, and the main way to find mistakes quickly in a table with hundreds of cells.

Typical causes of misreads are:

  • A photo with shadows, glare or a tilted page.
  • Small print or a low resolution.
  • Faint, grey or coloured text on a coloured background.
  • Handwriting, which OCR reads poorly in general.

A better source image prevents most mistakes. A flat page, even light and a sharp photo make the biggest difference.

Amber cells and the image boxes

In the stock count example of the tool, the paper says 105. The OCR read it as 1O5, with the letter O in the middle. The cell is amber, because the confidence is low, and the note under the image says "51 words recognised; 2 with low confidence (amber)". You correct it to 105.

Amber cell 1O5 in the Scanned Table to Spreadsheet result
The cell 1O5 is amber because of low confidence. The correct value is 105.

Do not stop at the amber cells. Amber means that the tool is not confident. It does not mean that the other cells are right, and a mistake can be made with high confidence. For figures that matter, compare column totals with the totals printed on the paper.

To check a cell, click it. The tool shows where the cell is on the image, with a box around the text that was read. You see the original characters next to the recognised ones, so you do not need to search the picture by eye. After you edit a cell, the tool says "Edited cells are no longer flagged".

Image box of a selected cell in the Scanned Table to Spreadsheet tool
Click a cell to see where it is on the image.

Use this for every amber cell. If the box is on the wrong part of the image, for example on a neighbouring cell, the table structure is wrong, and the problem is not the character but the layout. In that case, fix the rows and columns first.

A routine that works: start with the amber cells, then check the numeric columns for any cell that contains a letter, then compare the sums. A letter in a column of numbers is an error, even if it is not amber.

Edit, merge or split rows and columns

The recognised table is editable. Correct a value by clicking the cell and typing. If the structure is wrong, select a cell and use the buttons above the table: + Row below, − Row, Merge with next row, Split row, + Column after, − Column, Merge with next column and Split column.

  • Merge cells that were split by mistake, for example a long description that was cut into two columns.
  • Split a cell that holds two values, for example a number and a unit that were joined.
  • Remove or add rows and columns to match the paper table.

Make the structure right before you correct the values, because a shifted column turns every value in it into an error. After the table is right, export it. If the table goes into a CSV import, run it through Clean Messy CSV Data to trim spaces and check the types.

The whole workflow for photos and scans is in Turn a Scanned Table or Photo Into Excel.

Black and white option for faint scans

If the text in the picture is faint, grey or on a tinted background, the option Black and white (helps with shadows) can help. It converts the picture to pure black and white before the recognition, and the options Straighten a tilted photo and Boost contrast, which are on by default, prepare the picture as well. The black and white option which makes the characters stand out from the background. This helps with scans of old, faded or carbon-copy documents and with light grey print.

Black and white option in the Scanned Table to Spreadsheet tool
The black and white option can help with faint scans.

Try it when many cells are amber and the picture looks washed out. Compare the result with the first one: if the number of amber cells drops, keep the option. The option does not help every picture. A photo with strong shadows or one that is very blurred stays difficult, and for those a new photo is better than any setting.

Handwriting remains poor. The OCR is made for printed text, and a handwritten table needs a full check of every cell. For text in other scripts, such as Arabic, the digits need special attention, which is covered in OCR an Arabic Table to Excel With the Right Digits.

Try it

Open the Scanned Table to Spreadsheet, add your scan or photo and look for amber cells. Click each one to see the image box, correct the values, try the black and white option if the scan is faint, and compare the totals with the paper.

Was this guide helpful?
Share

Comments