Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

How to Improve OCR Accuracy on Low Quality Scans

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

This guide walks you through practical steps to get better text recognition from blurry, skewed, low-resolution, or otherwise imperfect scans. You'll learn how to prepare the image, adjust scanner and OCR settings, and clean up results, so you can extract usable text instead of a mess of errors.

What You'll Need

  • The scanned image file (TIFF, PNG, JPG, or PDF).
  • An OCR tool: a desktop app like Tesseract (free), ABBYY FineReader, or Adobe Acrobat; or an online service like Google Drive's built-in OCR or a web-based converter.
  • Basic image editing software: even Microsoft Paint or the preview app on your computer works, but GIMP (free) or Photoshop gives more control.
  • Optional: a PDF editor if your scan is already in PDF form.

Step-by-Step

  1. Check the original scan quality. Open the image and zoom to 100–200%. Look for blur, skew (text not horizontal), low contrast, or speckles. If the scan is unreadable to your eye, OCR will struggle—rescan if possible with higher DPI (300 DPI minimum) and a flat, clean glass.
  2. Convert to a lossless format. If your image is a JPG, re-save it as TIFF or PNG. JPG compression creates artifacts that confuse OCR. For PDFs, export pages as images using a PDF editor.
  3. Enhance contrast. Use image editing software to increase contrast. Go to Levels or Curves and pull the black point toward the histogram's left edge and the white point toward the right. Aim for near-black text on pure white background. Avoid over-contrasting which can break thin strokes.
  4. Sharpen the image. Apply a mild Unsharp Mask (radius 1–2 pixels, amount 50–100%). This makes edges crisper. Do not over-sharpen—it creates halos that hurt recognition.
  5. Deskew the page. If the text is tilted even slightly, rotate the image so the baseline of text is perfectly horizontal. Most OCR tools have an auto-deskew option; if not, rotate manually by 1–2 degrees until lines look straight.
  6. Remove noise and speckles. Use a despeckle or median filter. In GIMP, go to Filters > Enhance > Despeckle. In Photoshop, Filter > Noise > Reduce Noise. This clears dust and scanner artifacts.
  7. Clean up margins and borders. Crop out any dark edges, shadows, or non-text areas. OCR can misread page numbers, headers, or watermarks if they are partially visible.
  8. Binarize the image. Convert to pure black and white (threshold). In GIMP: Colors > Threshold. Set the threshold so text is solid black and background is white. This is the single most effective step for low-quality scans.
  9. Set OCR language and engine. In your OCR tool, select the correct language (e.g., English). If using Tesseract, use the `--psm 6` (assume a single uniform block) or `--psm 4` (assume a single column) flags for standard text layout. For mixed layouts, try `--psm 3` (default).
  10. Run OCR and proofread. After recognition, compare the output with the original. Most tools highlight uncertain characters. Manually fix any obvious errors—especially numbers, punctuation, and proper names.

Common Mistakes

  • Using JPG directly. JPG compression artifacts are a major cause of false characters. Always convert to PNG or TIFF first.
  • Skipping contrast enhancement. OCR needs a clear difference between text and background. Faded gray text on beige paper will fail.
  • Over-sharpening. Excessive sharpening creates white halos around letters, which OCR reads as part of the glyph.
  • Ignoring skew. Even a 2-degree tilt can cause letters to be misread (e.g., 'm' as 'rn'). Always deskew.
  • Not cropping. Page edges, shadows, and handwritten notes confuse OCR. Crop to the text area.
  • Using the wrong PSM mode. Tesseract's default assumes a single block; if your scan has multiple columns, text will be jumbled.

Tips

  • If the scan is very poor, try scanning at 600 DPI and then downscaling to 300 DPI after cleaning—this reduces noise.
  • Use a high-pass filter instead of sharpening for text: duplicate layer, apply High Pass with radius 2–5, set blend mode to Overlay.
  • For old documents with yellowed paper, remove the color cast first (Image > Auto Color or adjust white balance) before binarizing.
  • If you have multiple pages, process each page individually rather than batch, so you can adjust settings per page.
  • Consider using a dedicated OCR app that has a "scan" mode—they often have built-in auto-enhancement.

Troubleshooting

  • OCR returns gibberish. Check if the image is upside down or mirrored. Rotate 180° or flip horizontally. Also ensure the language is set correctly.
  • Output has random characters like '|' or '}'. This is often due to noise or low contrast. Re-apply threshold and despeckle.
  • Words are merged or split incorrectly. Increase DPI if possible, or try a different PSM mode. For Tesseract, `--psm 6` works well for a single block.
  • Italic or handwritten text fails. OCR is not reliable for handwriting. For italic, try to straighten the slant using shear transform (e.g., in GIMP: Transform > Shear).
  • Table data is misaligned. Use OCR software with table recognition (like ABBYY) or set Tesseract to `--psm 6` and then manually re-import into a spreadsheet.
  • Still poor results? Try a different OCR engine. Sometimes one engine handles certain fonts better than another.

Frequently Asked Questions

What DPI should I scan at for OCR?

300 DPI is the minimum. For small fonts or low-quality originals, 400–600 DPI helps, but anything above 600 usually adds no benefit and slows processing.

Can OCR work on photos of documents?

Yes, but you must correct perspective (straighten the photo) and lighting. Use a document scanner app on your phone that auto-crops and enhances.

Is it better to use a paid OCR tool?

Free tools like Tesseract and Google Drive's OCR are decent. Paid tools often have better layout analysis and language support, but for simple text, free is fine.

How do I OCR a PDF that is scanned?

Use Adobe Acrobat's "Scan & OCR" feature, or upload the PDF to Google Drive and open with Google Docs—it will run OCR automatically.

Why does OCR misread numbers like 0 and O?

Low resolution or poor contrast makes them look identical. Increasing DPI and contrast helps. Also, some OCR tools let you set a character whitelist (e.g., only digits) for numeric fields.

Can I improve OCR after it's done?

Yes, you can correct errors manually, but it's faster to fix the image first. Some tools have a "learn" feature where you correct a character once and it applies everywhere.