First of all, I would like to mention my requirements:
I have been working on an ANDROID Application since a couple of months. I need the code of OCR (Optical Character Recognition) in order to link that to my app through CYGWIN, JNI, NDK. I found that TESSERACT OCR is the only open source code available. I have downloaded the code of Tesseract OCR-3.00 from the following link:
http://code.google.com/p/tesseract-ocr/wiki/ReadMe
I successfully compiled the code in CYGWIN environment as per the steps mentioned in the "INSTALL" file present in the downloaded file. Finally all the MAKE files are generated. In order to use this code in my app, I need the ".so" file, which will be generated through CYGWIN..
Now, the problem am facing is:
I have imported the complete code Tesseract OCR into my Android app code in ECLIPSE as per the steps mentioned in the following link:
http://mindtherobot.com/blog/452/android-beginners-ndk-setup-step-by-step/
I had followed the procedure as mentioned in the above link..but importing the code of TESSERACT OCR is as tough as a hell when compared to the example given in the above link.
The final step where the ".so" is to be created is not working in the case of OCR..The error as shown in the following image![enter image description here][1]
SUGGESTIONS:
Plz suggest me the clear explaination on how to proceed with the next steps....plz plz..someone, plz do take some time to give clear explaination..
Thanks & Regards
when I tried working with Tesseract, I was not able to get it working with Windows and Cygwin. Even I used the same references as you did. Then after I tried compiling the 'tesseract-android-tools'. And it was not working either. After that I used a MAC with the native C environment for compilation and it worked. Maybe you Google after 'tesseract-android-tools' and you'll get a lot of help.
Hope it helps a bit for further progress.
Regards
Related
I'm'trying to use the pjsip lib for android, after reading some sites talking about the topic I still wondering how to use it.
Many examples suggest to start it building the apjsua folder in the downloaded package but I cannot find it in /pjproject-2.1.0/pjsip-apps/src/
I have all the other sources put not apjsua, does this folder have another name since the new version?
Thanks for your reply.
PJSIP has not yet released there Android version, it is only for testing purposes.
You can find the PJSIP projest for android in branches. Here is the link : http://svn.pjsip.org/repos/pjproject/branches/projects/android/
So I would suggest you to download the whole pjproject.
You can find the apjsua in pjproject/branches/projects/android/pjsip-apps/src/apjsua
In some versions its name is apjsua and in other versions its pjsua.
Checkout code from below link:
http://svn.pjsip.org/repos/pjproject/trunk
After checkout and building it with given commands on PJSIP getting started page, you will find it in following path:
PJSIP_DIR/pjsip_apps/src/pjsua/android/
For confirmation, you can check it by browsing code on following link:
http://trac.pjsip.org/repos/browser
Does anyone know how to play .mp4 video as live wallpaper?
I searched a lot, but couldn't find the solution. I just found this one but I am not getting any idea from it.
Please help me if you have any idea regarding this concept.
After spending 3 days finally I run this project in eclipse.
I am sharing the steps as it may help others:
Firstly, the most important thing is that Your project path and ndk path should not contain spaces else you will have problems following these steps. I also faced problems with it so please remove the spaces, if any.
For example :-
android ndk/Live wallpaper
replace it with
androidndk/Livewallpaper
Following are steps :-
1) Install NDK from Android NDK page
(I used Ubuntu OS)
2) Install plugins for NDK ( https://dl-sl.google.com/android/eclipse/ )
3) Open your terminal and go to your project directory path
For Example :- /yourprojectname$
4) Now from your project directory path write Your Android NDk path
For Example :-
/home/rainc/android_setup/android-ndk-r8d/ndk-build
And Press Enter. This will give you a .so file which means the library file has been generated..
You have done it successfully. If you are getting error(s) here then the installation and the other steps might be having error(s).
Following links helped me in my research:
First
Second
Third
And also thanks to Lazy Ninja for helping me.
You are up on a good challenge, unless you are familiar with android ndk. There is the library ffmpeg which will save you some time.
A tutorial on Video Live Wallpaper here.Go through part 1 -4.
And here is a link of the project code.
Hope it will help you get started.
I am currently developping an android application based on OCR (Optical Character Recognition). I've downloaded the "tesseract- android" project that contains tools for compiling the Tesseract, Leptonica, and JPEG libraries for use on Android. I am developping via Eclipse on Windows Vista OS.
I've also downloaded the necessary tools (android-ndk;apache ant..), and I've done carefully all the steps to build this project and add it as a library to my basic application.
My app consists of opening the camera for taking a picture and then processing this picture via tesseract API in order to transform it into text.
My question is:
1. Is it true that this procedure doesn't work under Windows OS?
2. When compiling, I am having the following error:
"java.lang.IllegalArgumentException: Data path must contain subfolder tessdata!"
What could be the potential error? The concerned portion of the java code is:
File myDir = getExternalFilesDir(Environment.MEDIA_MOUNTED);
TessBaseAPI baseApi = new TessBaseAPI();
baseApi.init(myDir, "eng");
I've also tried to use "/tess-two/external/tesseract-3.01/tessdata/tessconfigs" instead of "myDir", but the error remains the same.
I would highly appreciate any help.
Thanks in advance.
Q1. It should work on any operating system, I've been able to ndk-build on Win7, Mac OS Lion, and Ubuntu without any issues.
Q2. Make sure that you have permissions to write to the external storage, and have sufficient space to do so.
If that still fails, have a look at the DDMS and see the file explorer and double check your application is setting up the directory structure and copying over the traineddata.
I had an odd issue where it was creating the eng.traineddata file, but it was 0 bytes which led to all sorts of odd issues.
You could also create the directory structure manually to get you progressing, and fix this initialisation issue later on (but don't forget it!)
I was facing the same problem. Worked for me when I removed "tessdata" from the path.
Before (fail): path = "/mnt/sdcard/tesseract/tessdata";
After (success): path = "/mnt/sdcard/tesseract/";
Then, baseApi.init(path, "eng") worked with no exceptions.
Of course, tessdata folder should be in the path with the desired.traineddata file.
Path errors while compiling native stuff usually is not related with your java code. Your java code would be responsible for runtime problems. Check your build scripts and post more log messages.
I have C code in my Android app and would like to catch crashes and print them to a log file. I saw this post, and tried, but I can't find the execinfo lib.
I'm working with Ubuntu 11.10 and using NDK for compiling to Android.
Does anyone know how to find execinfo lib for NDK/ARM, or have another simple solution?
On Android, you have some sample specials utils code allowing to see and/or dump the stack.
Implementation is in base/libs/utils/CallStack.cpp. You'll a find a tiny sample code here.
I've been working with the vibration example from Adobe for Air 3.0's native extensions on Android.
I have the ANE compiled and the .apk packaged.
The problem I'm having is the actionscript library is getting a null ExtensionContext.
I tried creating the .apk with adt -package -target apk-debug so that I can see the actionscript traces in logcat and that's where I'm finding the null error.
extContext = ExtensionContext.createExtensionContext("com.adobe.Vibration", null);
extContext is null and crashes on the following .call() method.
All of the source is stock from the examples, I haven't changed anything.
Does anyone have any experience with getting one of Adobe's ANE examples working on a windows machine? Most of the examples are for Mac.
Good lord. What a waste of a week.
I was using a tutorial from gotoandlearn.com that was telling me to, in by build script, use a jar command to put my native extension in to a jar.
I simply used the .jar that's automatically built in the NativeAndroid/bin/ folder and all is well.
It turns out, that tutorial is out dated and not really useful for the build anymore.
One additional comment. You need to set target platform and checkbox Is Library from Properties -> Android to get compiled jar in bin folder.
P.S. .sh from gotoandlearn can be executed in Powershell in Windows with minor changes for running bat files: ( cmd "/c adt.bat" )
I'm having the exact same problem on a Native Extension I'm writing, and have open sourced. I started this project with tutorial code from Adobe DevNet. I've found examples of this specific issue I've tried to follow exactly, and have had no luck with it yet. I've identified it to be a sandbox allow-domain problem.
Here's my line of code:
_aneContext = ExtensionContext.createExtensionContext("com.adobe.sampleasextension", "");
Here is a link to the code in my GitHub project:
https://github.com/interactivenyc/ANESampleProject/blob/master/TEST_AndroidAIR/src/ANESampleTest.as
Here is my compiler error:
SecurityError: Error #3207: Application-sandbox content cannot access this feature.
at flash.system::Security$/allowDomain()
at com.adobe.sampleasextension::SampleASExtension()[/Users/stevewarren/Clients/Speakaboos/git_repositories/ANESampleProject/ANESampleSWC/src/com/adobe/sampleasextension/SampleASExtension.as:14]
at ANESampleTest/initializeANE()[/Users/stevewarren/Clients/Speakaboos/git_repositories/ANESampleProject/TEST_AndroidAIR/src/ANESampleTest.as:198]
at ANESampleTest/onAddedToStage()[/Users/stevewarren/Clients/Speakaboos/git_repositories/ANESampleProject/TEST_AndroidAIR/src/ANESampleTest.as:131]
at runtime::ContentPlayer/loadInitialContent()
at runtime::ContentPlayer/playRawContent()
at runtime::ContentPlayer/playContent()
at runtime::AppRunner/run()
at AppEntryCommon/run()
at global/runtime::AndroidMobileDeviceAppEntry()