Closed GoogleCodeExporter closed 9 years ago
Do the sample FacePreview or RecordActivity work?
Original comment by samuel.a...@gmail.com
on 22 Feb 2013 at 1:44
I just tried creating and running the RecordActivity, and the LogCat outputs
that there is an AndroidRuntime issue at line 183.
Line 183 is:
"yuvIplimage = IplImage.create(imageWidth, imageHeight, IPL_DEPTH_8U, 2);"
It seems that I am getting an error in initializing an IplImage, similar to
Issue 282.
If it makes any difference, I am developing the my app using is a Nexus S
running Android 4.0.4
Original comment by pcshah1...@gmail.com
on 22 Feb 2013 at 2:46
What if you call cvCreateImage() instead? And what's the error?
Original comment by samuel.a...@gmail.com
on 22 Feb 2013 at 2:47
When I call:
"yuvIplimage = cvCreateImage(cvSize(imageWidth,imageHeight), IPL_DEPTH_8U, 2);"
I still get the same error from the LogCat. Attached is a screenshot of the
output from LogCat.
Original comment by pcshah1...@gmail.com
on 22 Feb 2013 at 2:56
Attachments:
Can you attach the rest of the log? Just copy/paste all of it in text form
please.
Original comment by samuel.a...@gmail.com
on 22 Feb 2013 at 3:08
Sure, sorry for the trouble! Still new to all of this!
02-21 21:58:52.937: E/AndroidRuntime(2083): FATAL EXCEPTION: main
02-21 21:58:52.937: E/AndroidRuntime(2083):
java.lang.ExceptionInInitializerError
02-21 21:58:52.937: E/AndroidRuntime(2083): at
com.prateek.test.RecordActivity.initRecorder(RecordActivity.java:183)
02-21 21:58:52.937: E/AndroidRuntime(2083): at
com.prateek.test.RecordActivity.onCreate(RecordActivity.java:89)
02-21 21:58:52.937: E/AndroidRuntime(2083): at
android.app.Activity.performCreate(Activity.java:4465)
02-21 21:58:52.937: E/AndroidRuntime(2083): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
02-21 21:58:52.937: E/AndroidRuntime(2083): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
02-21 21:58:52.937: E/AndroidRuntime(2083): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
02-21 21:58:52.937: E/AndroidRuntime(2083): at
android.app.ActivityThread.access$600(ActivityThread.java:123)
02-21 21:58:52.937: E/AndroidRuntime(2083): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
02-21 21:58:52.937: E/AndroidRuntime(2083): at
android.os.Handler.dispatchMessage(Handler.java:99)
02-21 21:58:52.937: E/AndroidRuntime(2083): at
android.os.Looper.loop(Looper.java:137)
02-21 21:58:52.937: E/AndroidRuntime(2083): at
android.app.ActivityThread.main(ActivityThread.java:4424)
02-21 21:58:52.937: E/AndroidRuntime(2083): at
java.lang.reflect.Method.invokeNative(Native Method)
02-21 21:58:52.937: E/AndroidRuntime(2083): at
java.lang.reflect.Method.invoke(Method.java:511)
02-21 21:58:52.937: E/AndroidRuntime(2083): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
02-21 21:58:52.937: E/AndroidRuntime(2083): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
02-21 21:58:52.937: E/AndroidRuntime(2083): at
dalvik.system.NativeStart.main(Native Method)
02-21 21:58:52.937: E/AndroidRuntime(2083): Caused by:
java.lang.UnsatisfiedLinkError: Couldn't load jniopencv_core: findLibrary
returned null
02-21 21:58:52.937: E/AndroidRuntime(2083): at
java.lang.Runtime.loadLibrary(Runtime.java:365)
02-21 21:58:52.937: E/AndroidRuntime(2083): at
java.lang.System.loadLibrary(System.java:535)
02-21 21:58:52.937: E/AndroidRuntime(2083): at
com.googlecode.javacpp.Loader.loadLibrary(Loader.java:448)
02-21 21:58:52.937: E/AndroidRuntime(2083): at
com.googlecode.javacpp.Loader.load(Loader.java:372)
02-21 21:58:52.937: E/AndroidRuntime(2083): at
com.googlecode.javacpp.Loader.load(Loader.java:319)
02-21 21:58:52.937: E/AndroidRuntime(2083): at
com.googlecode.javacv.cpp.opencv_core.<clinit>(opencv_core.java:136)
02-21 21:58:52.937: E/AndroidRuntime(2083): ... 16 more
02-21 21:58:55.004: I/Process(2083): Sending signal. PID: 2083 SIG: 9
Original comment by pcshah1...@gmail.com
on 22 Feb 2013 at 3:15
Hum, looks like you are trying to use another library here:
http://stackoverflow.com/questions/8821926/android-ndk-library-findlibrary-returned-null
http://code.google.com/p/javacv/issues/detail?id=199
This can be tricky on Android. Are you trying to use more than one library?
Original comment by samuel.a...@gmail.com
on 22 Feb 2013 at 3:20
That's weird! I didn't even look that far down the log.
What I did was copy the following code into a project (importing the OpenCV
Library, and adding the jars: "javacpp.jar", "javacv.jar", and
"javacv-windows-x86_64" to the project):
http://javacv.googlecode.com/git/samples/RecordActivity.java
As i proceed to run it, that was the log that was output.
From what I can tell, I don't believe I'm using any other library other than
JavaCV (I literally copy/pasted code from the link, to try and figure out this
issue).
Original comment by pcshah1...@gmail.com
on 22 Feb 2013 at 3:27
Ah, so you didn't add the libjniopencv_core.so file as per the instructions in
the README.txt file? Then that's the problem here...
Original comment by samuel.a...@gmail.com
on 22 Feb 2013 at 3:29
Original issue reported on code.google.com by
pcshah1...@gmail.com
on 21 Feb 2013 at 3:26