1

I have been developing an application for android which uses tesseract OCR (optical character recognition) and was wondering if there is a method for improving the results for small text.

I have tried re-compiling the standard dictionary with my own frequent and normal word lists (using wordlist2dawg) and have seen no improvement (I can't even tell if it is helping!). I have also heard it is possible to alter the threshold at which tesseract uses dictionary words but I have no idea how to do this.

If anybody has an idea of how I could improve the results tesseract gives me I would really appreciate it!

TomSelleck
  • 6,706
  • 22
  • 82
  • 151

1 Answers1

3

I know of some options that might help you:

  1. Add extra space between image border and text. Tesseract would work awful if text in the image is positioned at the edge.
  2. Duplicate your image. For example, if you're performing OCR on a word 'foobar', clone the image and send 'foobar foobar foobar foobar foobar' to tesseract, results would be better.
  3. Google for font training and image binarization for tesseract.

Keep in mind, that built-in camera in mobile devices mostly produce low quality images (blured, noised, skewed etc.) OCR itself is a resource comsuming process and if you add a worthy image preprocessing to that, low-end and mid mobile devices (which are likely to have android) could face unexpectedly slow performance or even lack of resources. That's OK for free/study projects, but if you're planning a commercial app - consider using a better SDK.

Have a look at this question for details: OCR for android

Community
  • 1
  • 1
Nikolay
  • 2,206
  • 3
  • 20
  • 25
  • 1
    All good suggestions. Another suggestion is to "fix" the small text issue before actual OCR. An image can be increased or stretched 2x or 3x in x and y direction (proportionally) to produce larger image with larger text, which many OCR engines can read better. It requires to use some imaging library that can 'create' new pixels not jsut overwrite dpi in image header, but that is relatively simple pre-processing. – Ilya Evdokimov Mar 15 '12 at 17:29