I have been working on android from 6 months. So I have basic idea about Android development. Now I want to develop an OCR Android app using Tesseract. For that I have downloaded android-ndk-r6b, tess-two from Tesseract, Cygwin for Windows and installed C/C++ developer in Eclipse.
And I followed these two links:
1.http://www.itwizard.ro/interfacing-cc-libraries-via-jni-example-tesseract-163.html
2.http://gaut.am/making-an-ocr-android-app-using-tesseract/
but I got stuck in between. I mean I am not able to configure these things together.
Can anyone suggest me how to configure tesseract in Android from beginning (step by step)?
https://github.com/rmtheis/tess-two a fork of the Tesseract Android Tools with added functionality
This works for SDK r16 and NDK r7 (or the latest, depending on when you are reading this)
check the README for the guide.
I'm not sure if this works for Cygwin.
git clone git://github.com/rmtheis/tess-two tess
cd tess/tess-two
ndk-build
android update project --path .
ant release
If you don't want to set the environment, you can type out the absolute path like: /home/user/android-ndk-r7/ndk-build
since your using windows, it would look something like C:\<path to ndk>\ndk-build
same thing with android update project --path .
you can do something like C:\<path to sdk>\tools\android update project --path .
(I had to specify the target by adding android update project -t 10 --path .
for Android 2.3.3 )
When you're done, you can then import the tess-two project to Eclipse. Make sure tess-two is a library (you can check in Properties > Android > Library (beneath build target) )
be sure you have downloaded SDK r16 and use NDK r7 (or the latest, depending on when you are reading this) otherwise building will result in an error.
The instructions at your link #2 don't work using cygwin--you have to build using Linux. I've verified that those instructions work. So try using Linux instead of cygwin.
If you're using the instructions at your link #2, you don't need the instructions at your link #1 at all--it has what you need in JNI already available.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With