Andre Ahmed
Andre Ahmed

Reputation: 1891

What is the best way to do basic numbers recognition?

I would like to detect basic English Numbers from 0 to 9 using simple OCR on Android. I've looked for OCR for Android, but it is too complex for my main purpose, is there any simpler way to just detect numbers on Android?

Upvotes: 5

Views: 2935

Answers (2)

Nikolay
Nikolay

Reputation: 2214

If you want to perform OCR from the phone-based camera, it'l be hard to use predefined bitmaps: photos will be taken with different scale, they will contain noise, they'll be scewed etc, so that would hardly be accurate enough.

If you're developing an Android APP, you are most likely usign Java. The bad news in that there are no native opensource Java OCR SDKs. There are Java APIs which wrap calls for native interfaces, for example, for one of the most popular opensource OCR engines - Tesseract (http://groups.google.com/group/tesseract-ocr/) - there are some Java wrappers like tesjeract (http://code.google.com/p/tesjeract/) or Tess4J (http://tess4j.sf.net/). That could work for you, but it's rather hard to set up and will require developing image-preprocessing and font training on your side.

One more solution could be a cloud service. It requires end-user application to have the internet connection, but it's independent from your programming language choice and resources limitations. Have a look at ABBYY Cloud OCR SDK, it's a cloud-based OCR SDK recently launched by ABBYY. It's in beta, so for now it's totally free to use and it has a ready-to-go Android code samples. It has image pre-processing built-in, requires no training and simply works out of the box - you just send and image and receive ocr-ed data. Plus it has field-level recognition functionality which could save you a valuable piece of small device processing resources. I work @ ABBYY and can provide you additional info on our products if necessary.

Upvotes: 3

Andrey Rubshtein
Andrey Rubshtein

Reputation: 20915

A simple alternative is to predefine the digits as bitmaps, and to find them using normalized cross-correlation.
There are a lot of disadvantages in this method:

  • No robustness to different fonts
  • No robustness to scale of numbers
  • ...

But maybe that is what you need just to get started with.

Upvotes: 5

Related Questions