Optical Character Recognition Android with OpenCV
Asked Answered
S

2

12

I'm currently working on a project which involves optical character recognition in Android and really need some pointers from somebody who has some experience in the area.

I was told to start off by setting up OpenCV with Android (Set up OpenCv with Android) and going from there. Since then I have set up OpenCV and have all the samples (OpenCV android samples) and tutorials which come with it working.

My problem is that I can't find a solid direction to go in from here, I found a related question here whose answer points to a tutorial however I am unsure if it will work with Android.

I am basically stuck trying to pick between continuing with OpenCV or trying other tools I have been reading about like tesseract or pure java implementations.

Any advice about what direction to choose would be greatly appreciated, Thanks, Celic.

TL;DR Need Advice about best Optical Character Recognition Implementation in Android

Seismoscope answered 22/2, 2012 at 22:39 Comment(0)
D
6

You can take a look at JavaCV which a java interface to OpenCV

You can check something like Tesseract Android Tools (very decent): http://code.google.com/p/tesseract-android-tools/

Here is a heads up for a problem we all run into at the beginning when using it: Bytes Per Pixel value for byte representation of image in Android (if you are using the camera ofc)

Derward answered 22/2, 2012 at 22:46 Comment(3)
I will do mate thanks very much for the suggestions.. I have been playing around a bit with google goggles and am very impressed with its capabilities, is it built Tesseract do you know ??Seismoscope
I think so (this comes from memory and I can't seem to confirm it elsewhere)Derward
Just letting you know I changed to Tesseract and got a sample OCR program running, thanks !!Seismoscope
S
3

There's a tutorial here that's based on a fork of Tesseract Tools for Android. To get good results, you'll probably need to preprocess your images using some kind of thresholding.

Satiable answered 24/2, 2012 at 1:41 Comment(3)
Hey, thanks for the reply, I managed to get everything in that tutorial set up but when I ran the authors sample app, everything works fine until after I take the picture and accept it to carry out OCR on it at which point the app crashs.. I can't figure the errors out, if anybody has an idea of a solution it would be really helpful. img803.imageshack.us/img803/4351/screenshotat20120224094.pngSeismoscope
Be sure to use ARGB_8888 format for the bitmap. Example here.Satiable
Hey thanks for the suggestion, that was the problem alright, had to put a 'bitmap = bitmap.copy(Bitmap.Config.ARGB_8888, true);' outside an 'if (rotate != 0)' statement.Seismoscope

© 2022 - 2024 — McMap. All rights reserved.