Ask Your Question

Revision history [back]

OpenCV Android, testing on a Galaxy S1...

Hi, all:

I just clicked OCV T2 Use OpenCV on my Galaxy S1, but received all the following error message from LogCat. Any suggestions?

12-19 23:35:53.056: I/OCVSample::Activity(6226): Instantiated new class org.opencv.samples.tutorial2.Sample2NativeCamera 12-19 23:35:53.060: I/OCVSample::Activity(6226): called onCreate 12-19 23:35:53.080: D/CameraBridge(6226): Attr count: 3 12-19 23:35:53.099: D/OpenCVManager/Helper(6226): Service connection created 12-19 23:35:53.103: D/OpenCVManager/Helper(6226): Trying to get library path 12-19 23:35:53.290: D/OpenCVManager/Helper(6226): Trying to get library list 12-19 23:35:53.458: D/OpenCVManager/Helper(6226): Library list: "" 12-19 23:35:53.458: D/OpenCVManager/Helper(6226): First attempt to load libs 12-19 23:35:53.458: D/OpenCVManager/Helper(6226): Trying to init OpenCV libs 12-19 23:35:53.458: D/OpenCVManager/Helper(6226): Trying to load library /data/data/org.opencv.engine/lib/libopencv_java.so 12-19 23:35:53.458: D/dalvikvm(6226): Trying to load lib /data/data/org.opencv.engine/lib/libopencv_java.so 0x47ad3fa0 12-19 23:35:53.498: D/dalvikvm(6226): Added shared lib /data/data/org.opencv.engine/lib/libopencv_java.so 0x47ad3fa0 12-19 23:35:53.498: D/OpenCVManager/Helper(6226): OpenCV libs init was ok! 12-19 23:35:53.498: D/OpenCVManager/Helper(6226): First attempt to load libs is OK 12-19 23:35:53.498: D/OpenCVManager/Helper(6226): Init finished with status 0 12-19 23:35:53.498: D/OpenCVManager/Helper(6226): Unbind from service 12-19 23:35:53.501: D/OpenCVManager/Helper(6226): Calling using callback 12-19 23:35:53.501: I/OCVSample::Activity(6226): OpenCV loaded successfully 12-19 23:35:53.548: D/CameraBridge(6226): call surfaceChanged event 12-19 23:35:53.548: D/OpenCV::camera(6226): CvCapture_Android::CvCapture_Android(0) 12-19 23:35:53.548: D/OpenCV::camera(6226): Library name: libopencv_java.so 12-19 23:35:53.548: D/OpenCV::camera(6226): Library base address: 0x82000000 12-19 23:35:53.552: D/OpenCV::camera(6226): Libraries folder found: /data/data/org.opencv.engine/lib/ 12-19 23:35:53.552: D/OpenCV::camera(6226): CameraWrapperConnector::connectToLib: folderPath=/data/data/org.opencv.engine/lib/ 12-19 23:35:53.552: E/OpenCV::camera(6226): ||libnative_camera_r4.0.3.so 12-19 23:35:53.552: E/OpenCV::camera(6226): ||libnative_camera_r2.2.0.so 12-19 23:35:53.552: E/OpenCV::camera(6226): ||libnative_camera_r4.2.0.so 12-19 23:35:53.552: E/OpenCV::camera(6226): ||libnative_camera_r4.1.1.so 12-19 23:35:53.552: E/OpenCV::camera(6226): ||libnative_camera_r3.0.1.so 12-19 23:35:53.552: E/OpenCV::camera(6226): ||libnative_camera_r4.0.0.so 12-19 23:35:53.552: E/OpenCV::camera(6226): ||libnative_camera_r2.3.3.so 12-19 23:35:53.552: D/OpenCV::camera(6226): try to load library 'libnative_camera_r4.2.0.so' 12-19 23:35:53.556: D/OpenCV::camera(6226): CameraWrapperConnector::connectToLib ERROR: cannot dlopen camera wrapper library /data/data/org.opencv.engine/lib/libnative_camera_r4.2.0.so, dlerror="Cannot load library: link_image[1995]: failed to link libnative_camera_r4.2.0.so 12-19 23:35:53.556: D/OpenCV::camera(6226): " 12-19 23:35:53.556: D/OpenCV::camera(6226): try to load library 'libnative_camera_r4.1.1.so' 12-19 23:35:53.560: D/OpenCV::camera(6226): CameraWrapperConnector::connectToLib ERROR: cannot dlopen camera wrapper library /data/data/org.opencv.engine/lib/libnative_camera_r4.1.1.so, dlerror="Cannot load library: link_image[1995]: failed to link libnative_camera_r4.1.1.so 12-19 23:35:53.560: D/OpenCV::camera(6226): " 12-19 23:35:53.560: D/OpenCV::camera(6226): try to load library 'libnative_camera_r4.0.3.so' 12-19 23:35:53.560: D/OpenCV::camera(6226): CameraWrapperConnector::connectToLib ERROR: cannot dlopen camera wrapper library /data/data/org.opencv.engine/lib/libnative_camera_r4.0.3.so, dlerror="Cannot load library: link_image[1995]: failed to link libnative_camera_r4.0.3.so 12-19 23:35:53.560: D/OpenCV::camera(6226): " 12-19 23:35:53.560: D/OpenCV::camera(6226): try to load library 'libnative_camera_r4.0.0.so' 12-19 23:35:53.560: D/OpenCV::camera(6226): CameraWrapperConnector::connectToLib ERROR: cannot dlopen camera wrapper library /data/data/org.opencv.engine/lib/libnative_camera_r4.0.0.so, dlerror="Cannot load library: link_image[1995]: failed to link libnative_camera_r4.0.0.so 12-19 23:35:53.560: D/OpenCV::camera(6226): " 12-19 23:35:53.560: D/OpenCV::camera(6226): try to load library 'libnative_camera_r3.0.1.so' 12-19 23:35:53.560: D/OpenCV::camera(6226): CameraWrapperConnector::connectToLib ERROR: cannot dlopen camera wrapper library /data/data/org.opencv.engine/lib/libnative_camera_r3.0.1.so, dlerror="Cannot load library: link_image[1995]: failed to link libnative_camera_r3.0.1.so 12-19 23:35:53.560: D/OpenCV::camera(6226): " 12-19 23:35:53.560: D/OpenCV::camera(6226): try to load library 'libnative_camera_r2.3.3.so' 12-19 23:35:53.564: D/OpenCV::camera(6226): CameraWrapperConnector::connectToLib ERROR: cannot dlopen camera wrapper library /data/data/org.opencv.engine/lib/libnative_camera_r2.3.3.so, dlerror="Cannot load library: link_image[1995]: failed to link libnative_camera_r2.3.3.so 12-19 23:35:53.564: D/OpenCV::camera(6226): " 12-19 23:35:53.564: D/OpenCV::camera(6226): try to load library 'libnative_camera_r2.2.0.so' 12-19 23:35:53.564: D/OpenCV::camera(6226): CameraWrapperConnector::connectToLib ERROR: cannot dlopen camera wrapper library /data/data/org.opencv.engine/lib/libnative_camera_r2.2.0.so, dlerror="Cannot load library: link_image[1995]: failed to link libnative_camera_r2.2.0.so 12-19 23:35:53.564: D/OpenCV::camera(6226): " 12-19 23:35:53.564: E/OpenCV::camera(6226): CameraWrapperConnector::connectToLib ERROR: cannot dlopen camera wrapper library 12-19 23:35:53.564: E/OpenCV::camera(6226): Native_camera returned opening error: 4 12-19 23:36:00.583: D/AndroidRuntime(6226): Shutting down VM 12-19 23:36:00.583: W/dalvikvm(6226): threadid=1: thread exiting with uncaught exception (group=0x4001d7d0) 12-19 23:36:00.599: E/AndroidRuntime(6226): FATAL EXCEPTION: main 12-19 23:36:00.599: E/AndroidRuntime(6226): java.lang.RuntimeException: Unable to pause activity {org.opencv.samples.tutorial2/org.opencv.samples.tutorial2.Sample2NativeCamera}: java.lang.NullPointerException 12-19 23:36:00.599: E/AndroidRuntime(6226): at android.app.ActivityThread.performPauseActivity(ActivityThread.java:3348) 12-19 23:36:00.599: E/AndroidRuntime(6226): at android.app.ActivityThread.performPauseActivity(ActivityThread.java:3305) 12-19 23:36:00.599: E/AndroidRuntime(6226): at android.app.ActivityThread.handlePauseActivity(ActivityThread.java:3288) 12-19 23:36:00.599: E/AndroidRuntime(6226): at android.app.ActivityThread.access$2500(ActivityThread.java:125) 12-19 23:36:00.599: E/AndroidRuntime(6226): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2044) 12-19 23:36:00.599: E/AndroidRuntime(6226): at android.os.Handler.dispatchMessage(Handler.java:99) 12-19 23:36:00.599: E/AndroidRuntime(6226): at android.os.Looper.loop(Looper.java:123) 12-19 23:36:00.599: E/AndroidRuntime(6226): at android.app.ActivityThread.main(ActivityThread.java:4627) 12-19 23:36:00.599: E/AndroidRuntime(6226): at java.lang.reflect.Method.invokeNative(Native Method) 12-19 23:36:00.599: E/AndroidRuntime(6226): at java.lang.reflect.Method.invoke(Method.java:521) 12-19 23:36:00.599: E/AndroidRuntime(6226): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858) 12-19 23:36:00.599: E/AndroidRuntime(6226): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 12-19 23:36:00.599: E/AndroidRuntime(6226): at dalvik.system.NativeStart.main(Native Method) 12-19 23:36:00.599: E/AndroidRuntime(6226): Caused by: java.lang.NullPointerException 12-19 23:36:00.599: E/AndroidRuntime(6226): at org.opencv.android.NativeCameraView.disconnectCamera(NativeCameraView.java:57) 12-19 23:36:00.599: E/AndroidRuntime(6226): at org.opencv.android.CameraBridgeViewBase.onExitStartedState(CameraBridgeViewBase.java:267) 12-19 23:36:00.599: E/AndroidRuntime(6226): at org.opencv.android.CameraBridgeViewBase.processExitState(CameraBridgeViewBase.java:231) 12-19 23:36:00.599: E/AndroidRuntime(6226): at org.opencv.android.CameraBridgeViewBase.checkCurrentState(CameraBridgeViewBase.java:205) 12-19 23:36:00.599: E/AndroidRuntime(6226): at org.opencv.android.CameraBridgeViewBase.disableView(CameraBridgeViewBase.java:145) 12-19 23:36:00.599: E/AndroidRuntime(6226): at org.opencv.samples.tutorial2.Sample2NativeCamera.onPause(Sample2NativeCamera.java:77) 12-19 23:36:00.599: E/AndroidRuntime(6226): at android.app.Activity.performPause(Activity.java:3842) 12-19 23:36:00.599: E/AndroidRuntime(6226): at android.app.Instrumentation.callActivityOnPause(Instrumentation.java:1190) 12-19 23:36:00.599: E/AndroidRuntime(6226): at android.app.ActivityThread.performPauseActivity(ActivityThread.java:3335) 12-19 23:36:00.599: E/AndroidRuntime(6226): ... 12 more