OCR Simple example android using tesseract compilation error - android

I am making a library called tesstwo, and it works, but there's one problem when I'm trying to compile for Simple Android OCR. It says:
import com.googlecode.tesseract.android.TessBaseAPI;
cannot resolve library
Does anyone know what the problem and how to solve it?

Hey i found the solution for it
all u need is to build ur Ndk and How to do that?
Its simple
just take the path where to have saved the tess-two folder in the terminal(ubuntu)
for
Ubuntu:cd /home/workspace/tess-two-master/tess-two //This is my path u will have different
tess-two$: /(path where u have installed ur ndk)/ndk-build
Windows:cd /cygdrive/e/terril/workspace/tess-two-master/tess-two ; /cygdrive/e/terril/Libraries/android-ndk-r8b-windows/android-ndk-r8b/ndk-build
It will work

Related

Error in MainAcitivity.java file & no style are loading

I am new to android. I am creating an android application, but there are many errors showing in MainActivity.java. Here is a screenshot
Another problem is that no style in showing in activity_main.xml. Here is the screenshot
Although I have added appcompact_v7 jar file like this
But it's not recognizing it in android option of project propertise
I have installed Support library in SDK manager. Please tell me how to solve this problem?
It is really hard to say what is wrong there. here are some things that you should try:
first of all, there are errors in your xml file (activity_xml). Please check if xml is properly formatted and you are using right tags. For debugging purpose, please make your acitivity_xml an empty FrameLayout and see if it works.
Include android 6.0 into your build path. Clean the project and try building again. Make sure your layouts are error free before doing that.
Your eclipse is unable to detect referenced library at given location. Please make sure referenced library is at same place and ERROR-FREE. If library has error, your project won't include it.
Please solve all problems one by one. First make an error free xml, then a Hello world Activity. Run it on device or emulator. Once done, try to solve library and import problem now.
Best Suggestion: Please migrate to Android Studio and gradle for better support and learning.

I can't find Java_org_opencv_objdetect_CascadeClassifier for opencv android sdk in jni folder?

Have all of source code been release? My opencv version is 2.4.9. I have reorganize my project,write
Android.mk by myself.Finally I run face-detection demo and I got "Native method not found: org.opencv.objdetect.CascadeClassifier.CascadeClassifier_1:" something like this. I have search the whole opencv source but I can't find Java_org_opencv_objdetect_CascadeClassifier_CascadeClassifier_1 or anything like this.
I dont know the specific question by you.But Native method not found is the common error.Possible reasons for native method not found are
1.)the type mismatch in the c++ function name and java function name.The c++ function name must be in
the format Java_PackageName_classname_functionname
2.)you are calling function before initilization of opencv library.
If you are again not able to find please share your code
the sample problem puzzled me long time.
(my apk running well as using Android studio install it,when using Android.mk to complie in Android System (put source file to packages/apps/"apk name"))
I just replay"libopencv_java3.so"file by "\OpenCV-android-sdk\sdk\native\libs\arm64-v8a\libopencv_java3.so",because this two files size is different,then this problem is solved.
as a result , this problem should be caused by "libopencv_java3.so"

Importing and using a library in android studio

I am using android studio to import this project called https://github.com/Pixate/pixate-freestyle-android. However when I import it into android studio the folder under samples, freestyleshowcase doesnt seem to build. The other 2 samples buld correctly. There is a red circle around the java file with a J (error) but there is no error in the file itself. COuld someone please help me out?
You are obviously missing some libraries but it is going to be hard for anyone to tell you which since we do not know the libraries the project needs.You can try Build-->Rebuild Project or Build-->Clean Peoject if it still doesn't work, close and open Android Studio.
If that doesn't work also then you have to go the hard way of identifying the libraries need by the project samples you imported and see if you have them.
When in doubt, you can try the Library Dependency option (using Maven) as demonstrated here:
https://www.youtube.com/watch?v=6BUcx9gGQ3o
That way, you won't have to manually edit the build.gradle file.

Converting a set of images into a video using opencv

I tried the code which I found in this link-
how to convert images into video in android using javacv?
But I had a handful of error -
I have included opencv 2.4.6 -
Can anyone please help me resolve this problem...
Also If you know how to convert a set of images into a video using opencv please let me know how to do it.
It's not a problem with OpenCV, but with you project settings (generally). Here you will find lot of solutions, if you will still have problems give us more details.
I encountered this type of problem before. Don't forget to manually add the .jar files on your project's lib folder. Although it is not a requirement, I solved mine by doing so. Then import the .jar files and add it to your project's build path.

Tesseract OCR Execution process for my ANDROID app

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

Categories

Resources