Open GoogleCodeExporter opened 9 years ago
Just add everything needed by both JavaCV and Tesseract OCR. Your package is
obviously missing the libjniopencv_core.so file because according to your error
log:
"Couldn't load jniopencv_core: findLibrary returned null"
Original comment by samuel.a...@gmail.com
on 6 May 2012 at 12:46
Thank for your reply!
Before added Tesseract OCR library, JavaCV is ok, no error. But after add
Tesseract OCR, this error was appeared. So, if I remove Tessreact, every thing
is ok.
I sure Tesseract OCR work well.
Original comment by mmnn...@gmail.com
on 6 May 2012 at 2:03
Then the problem may lie with Android, since it is the call to
System.loadLibrary() that is failing to find the file named
"libjniopencv_core.so". I cannot do anything about that. Can you ask the
developers of Android see what they tell you? Thank you
Original comment by samuel.a...@gmail.com
on 6 May 2012 at 2:14
Me too with mmnn in Comment 2. I'm also using Tessreact and JavaCV.
So System.loadLibrary() and samuel's JavaCpp technology cannot be used toghther?
Original comment by xyxzfj@gmail.com
on 17 May 2012 at 12:02
This issue can easily be repruduced:
1. Build and run project FacePreview (see download javacv-bin-20120512.zip)
(File will be added along with FacePreview.java under package
com.googlecode.javacv.facepreview)
(The result will be OK.)
2. Build and add library tesseract-android-tools () to project FacePreview.
3. Add "TessBaseAPI tessBaseAPI = new TessBaseAPI();" to
com.googlecode.javacv.facepreview.FacePreview.onCreate(), run.
The error stack trace: (see the attached file for detail)
05-17 20:49:34.959: E/AndroidRuntime(16679): Caused by:
java.lang.UnsatisfiedLinkError: Couldn't load jniopencv_core: findLibrary
returned null
05-17 20:49:34.959: E/AndroidRuntime(16679): at
java.lang.Runtime.loadLibrary(Runtime.java:429)
05-17 20:49:34.959: E/AndroidRuntime(16679): at
java.lang.System.loadLibrary(System.java:554)
05-17 20:49:34.959: E/AndroidRuntime(16679): at
com.googlecode.javacpp.Loader.loadLibrary(Loader.java:409)
05-17 20:49:34.959: E/AndroidRuntime(16679): at
com.googlecode.javacpp.Loader.load(Loader.java:342)
05-17 20:49:34.959: E/AndroidRuntime(16679): at
com.googlecode.javacpp.Loader.load(Loader.java:316)
05-17 20:49:34.959: E/AndroidRuntime(16679): at
com.googlecode.javacv.cpp.opencv_core.<clinit>(opencv_core.java:131)
05-17 20:49:34.959: E/AndroidRuntime(16679): ... 26 more
Original comment by xyxzfj@gmail.com
on 17 May 2012 at 12:52
Attachments:
Can you list me the files you have in the APK?
Original comment by samuel.a...@gmail.com
on 17 May 2012 at 1:02
Hi Samuel,
Fantastic! In preparing for you my error illustration project based on
FacePreview, I got Javacv and Tesseract run together peacefully!
It is: Do not use
"android.library.reference.1=../tesseract-android-tools/tesseract-android-tools"
to reference project tesseract-android-tools, instead add
tesseract-android-tools.jar and liblept.so and libtess.so into project
FacePreview. Then everything is OK!
The attached file FacePreview(Javacv and Tesseract).zip is an OK project now.
javacpp.jar, javacv.jar and libs from OpenCV-2.4.0-android-arm.zip
and javacv-android-arm.jar are missing and you should add them to run the
project.
Original comment by xyxzfj@gmail.com
on 17 May 2012 at 11:56
Attachments:
Ah, thanks for the update! I guess JavaCV could be more Android friendly, but I
am not sure how to do it without making it less Java SE friendly... Let me know
if you figure this out, thanks
Original comment by samuel.a...@gmail.com
on 18 May 2012 at 1:10
Hi Samuel,
could you tell us what's the smallest required *.so set to build a specific
project?
In my example, I just used constants and methods from
com.googlecode.javacv.cpp.opencv_core, com.googlecode.javacv.cpp.opencv_highgui
and com.googlecode.javacv.cpp.opencv_highgui, but folder armeabi is 22.4 MB,
which makes the zipped AndroidVIQ.apk 9.70 MB. With out the folder armeabi,
it's only 648 KB!
I tried to remove all .so files except what I know -- libjniopencv_highgui.so,
libopencv_highgui.so, libjniopencv_imgproc.so, libopencv_imgproc.so,
libjniopencv_core.so, libopencv_core.so and my libtess.so andliblept.so, But
programme goes wrong saying library missing...
Original comment by xyxzfj@gmail.com
on 21 May 2012 at 12:12
Yes, that should work. What library does it say is missing?
Original comment by samuel.a...@gmail.com
on 21 May 2012 at 1:07
Yes, that really works! I've just wrongly removed libjniopencv_core.so.
Original comment by xyxzfj@gmail.com
on 21 May 2012 at 1:39
FYI, this should get better with the new Gradle-based build system in Android:
http://tools.android.com/tech-docs/new-build-system
If someone figures out how to make everything work well together, please post
your findings here, thanks!
Original comment by samuel.a...@gmail.com
on 4 Jan 2014 at 2:37
Original issue reported on code.google.com by
mmnn...@gmail.com
on 6 May 2012 at 12:13Attachments: