Ask Your Question
0

Blank screen on android 4.2

asked 2013-02-28 08:33:45 -0600

Barry Thomas gravatar image

updated 2013-02-28 23:51:34 -0600

Andrey Pavlenko gravatar image

Hi

My OpenCV demo on Google Play, a superset of some of the demo apps, gives me a blank screen on Android 4.2 I have tried using OpenCV 2.4.3 and 2.4.0 with the same result. Here's my stack trace:

02-28 14:19:55.318: D/dalvikvm(10526): Trying to load lib /data/app-lib/barry.opencvdemo-1/libopencv_java.so 0x415d0b30
02-28 14:19:55.318: D/dalvikvm(10526): Shared lib '/data/app-lib/barry.opencvdemo-1/libopencv_java.so' already loaded in same CL 0x415d0b30
02-28 14:19:55.318: D/CAMERA_ACTIVITY(10526): Library name: libopencv_java.so
02-28 14:19:55.318: D/CAMERA_ACTIVITY(10526): Library base address: 0x7406a000
02-28 14:19:55.338: D/CAMERA_ACTIVITY(10526): Libraries folder found: /data/app-lib/barry.opencvdemo-1/
02-28 14:19:55.338: D/CAMERA_ACTIVITY(10526): CameraWrapperConnector::connectToLib: folderPath=/data/app-lib/barry.opencvdemo-1/
02-28 14:19:55.338: E/CAMERA_ACTIVITY(10526): ||libnative_camera_r2.3.3.so
02-28 14:19:55.338: E/CAMERA_ACTIVITY(10526): ||libnative_camera_r4.0.3.so
02-28 14:19:55.338: E/CAMERA_ACTIVITY(10526): ||libnative_camera_r2.2.0.so
02-28 14:19:55.338: E/CAMERA_ACTIVITY(10526): ||libnative_camera_r3.0.1.so
02-28 14:19:55.338: E/CAMERA_ACTIVITY(10526): ||libnative_camera_r4.0.0.so
02-28 14:19:55.338: D/CAMERA_ACTIVITY(10526): try to load library 'libnative_camera_r4.0.3.so'
02-28 14:19:55.338: D/CAMERA_ACTIVITY(10526): CameraWrapperConnector::connectToLib ERROR: cannot dlopen camera wrapper library /data/app-lib/barry.opencvdemo-1/libnative_camera_r4.0.3.so, dlerror="Cannot load library: soinfo_relocate(linker.cpp:975): cannot locate symbol "_ZN7android14SurfaceTextureC1Ejbjb" referenced by "libnative_camera_r4.0.3.so"..."
02-28 14:19:55.338: D/CAMERA_ACTIVITY(10526): try to load library 'libnative_camera_r4.0.0.so'
02-28 14:19:55.348: D/CAMERA_ACTIVITY(10526): CameraWrapperConnector::connectToLib ERROR: cannot dlopen camera wrapper library /data/app-lib/barry.opencvdemo-1/libnative_camera_r4.0.0.so, dlerror="Cannot load library: soinfo_relocate(linker.cpp:975): cannot locate symbol "_ZN7android14SurfaceTextureC1Ejbj" referenced by "libnative_camera_r4.0.0.so"..."
02-28 14:19:55.348: D/CAMERA_ACTIVITY(10526): try to load library 'libnative_camera_r3.0.1.so'
02-28 14:19:55.348: D/CAMERA_ACTIVITY(10526): CameraWrapperConnector::connectToLib ERROR: cannot dlopen camera wrapper library /data/app-lib/barry.opencvdemo-1/libnative_camera_r3.0.1.so, dlerror="Cannot load library: soinfo_relocate(linker.cpp:975): cannot locate symbol "_ZN7android14SurfaceTextureC1Ej" referenced by "libnative_camera_r3.0.1.so"..."
02-28 14:19:55.348: D/CAMERA_ACTIVITY(10526): try to load library 'libnative_camera_r2.3.3.so'
02-28 14:19:55.348: D/CAMERA_ACTIVITY(10526): Loaded library '/data/app-lib/barry.opencvdemo-1/libnative_camera_r2.3.3.so'
02-28 14:19:55.348: D/OpenCV_NativeCamera(10526): CameraHandler::initCameraConnect(0x7436b479, 0, 0x73004b60, 0x0)
02-28 14:19:55.348: D/OpenCV_NativeCamera(10526): Connecting to CameraService v 2.3
02-28 14:19:55.698: D/OpenCV_NativeCamera(10526): Instantiated new CameraHandler (0x7436b479, 0x73004b60)

I don't get any compile or run errors, but no frames are being processed because some part of the lib is failing to load. Can anyone point me in the right direction here please? I'm struggling.

Many thanks

Barry

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2013-02-28 11:40:01 -0600

  1. There are separate libraries for native camera support on different Androids. As I see in your log you forgot libraries for Android 4.1 and Android 4.2 (libnative_camera_r4.1 and libnative_camera_r4.2). Add them to libs/[arch] folder of your Android project or add "OPENCV_CAMERA_MODULES:=on" and "OPENCV_INSTALL_MODULES:=on" strings to your Android.mk before including OpenCV.mk.

  2. I recommend you to use OpenCV Manager instead including OpenCV in your packages. It gives you additional optimizations on different platforms and additional updates for new Android versions support. Android 4.1.x and Android 4.2.x support already added to current version of OpenCV Manager.

edit flag offensive delete link more

Comments

Thanks Alexander, I've done some reading, I'll try moving over to the Manager.

Barry

Barry Thomas gravatar imageBarry Thomas ( 2013-03-01 04:05:44 -0600 )edit

Alexander, Stuck on a similar issue. Am using Qt instead of JAVA to develop an app. Blank screen. Tried using Opencv manager, Android.mk and whatever possible. Still not sure what it is.

sumitsrv gravatar imagesumitsrv ( 2014-09-02 06:10:28 -0600 )edit

Question Tools

Stats

Asked: 2013-02-28 08:33:45 -0600

Seen: 1,645 times

Last updated: Feb 28 '13