VideoCapture.isOpened() always returns false on Android

asked 2015-12-16 09:59:44 -0500

bmosch gravatar image

Hi,

I am new to OpenCV, and I am trying to get this library to work. Part of my code looks like this:

Log.e("myapp", "creating VideoCapture");
VideoCapture mCamera = new VideoCapture(mCameraId);
Log.e("myapp", "created VideoCapture");
if(!mCamera.isOpened()){
    Log.e("myapp", "VideoCapture is not open");
}

Since it is using OpenCV 2.4, I tried to do so as well. Between the first two log messages, I got a lot of initialization errors:

12-16 16:44:04.037: E/myapp(10300): creating VideoCapture
12-16 16:44:04.037: D/OpenCV::camera(10300): CvCapture_Android::CvCapture_Android(1)
12-16 16:44:04.038: D/OpenCV::camera(10300): Library name: libopencv_java.so
12-16 16:44:04.038: D/OpenCV::camera(10300): Library base address: 0xa1dff000
12-16 16:44:04.044: D/OpenCV::camera(10300): Libraries folder found: /data/app/com.scrambled.kookstand-2/lib/arm/
12-16 16:44:04.044: D/OpenCV::camera(10300): CameraWrapperConnector::connectToLib: folderPath=/data/app/com.scrambled.kookstand-2/lib/arm/
12-16 16:44:04.044: E/OpenCV::camera(10300): ||libnative_camera_r4.1.1.so
12-16 16:44:04.044: E/OpenCV::camera(10300): ||libnative_camera_r4.0.3.so
12-16 16:44:04.044: E/OpenCV::camera(10300): ||libnative_camera_r2.3.3.so
12-16 16:44:04.044: E/OpenCV::camera(10300): ||libnative_camera_r4.2.0.so
12-16 16:44:04.044: E/OpenCV::camera(10300): ||libnative_camera_r2.2.0.so
12-16 16:44:04.044: E/OpenCV::camera(10300): ||libnative_camera_r3.0.1.so
12-16 16:44:04.044: E/OpenCV::camera(10300): ||libnative_camera_r4.3.0.so
12-16 16:44:04.044: E/OpenCV::camera(10300): ||libnative_camera_r4.0.0.so
12-16 16:44:04.044: E/OpenCV::camera(10300): ||libnative_camera_r4.4.0.so
12-16 16:44:04.044: D/OpenCV::camera(10300): try to load library 'libnative_camera_r4.4.0.so'
12-16 16:44:04.046: D/OpenCV::camera(10300): CameraWrapperConnector::connectToLib ERROR: cannot dlopen camera wrapper library /data/app/com.scrambled.kookstand-2/lib/arm/libnative_camera_r4.4.0.so, dlerror="dlopen failed: cannot locate symbol "_ZN7android11BufferQueueC1ERKNS_2spINS_19IGraphicBufferAllocEEE" referenced by "libnative_camera_r4.4.0.so"..."
12-16 16:44:04.046: D/OpenCV::camera(10300): try to load library 'libnative_camera_r4.3.0.so'
12-16 16:44:04.046: D/OpenCV::camera(10300): CameraWrapperConnector::connectToLib ERROR: cannot dlopen camera wrapper library /data/app/com.scrambled.kookstand-2/lib/arm/libnative_camera_r4.3.0.so, dlerror="dlopen failed: cannot locate symbol "_ZN7android11BufferQueueC1EbRKNS_2spINS_19IGraphicBufferAllocEEE" referenced by "libnative_camera_r4.3.0.so"..."
12-16 16:44:04.046: D/OpenCV::camera(10300): try to load library 'libnative_camera_r4.2.0.so'
12-16 16:44:04.047: D/OpenCV::camera(10300): CameraWrapperConnector::connectToLib ERROR: cannot dlopen camera wrapper library /data/app/com.scrambled.kookstand-2/lib/arm/libnative_camera_r4.2.0.so, dlerror="dlopen failed: cannot locate symbol "_ZN7android6Camera10disconnectEv" referenced by "libnative_camera_r4.2.0.so"..."
12-16 16:44:04.047: D/OpenCV::camera(10300): try to load library 'libnative_camera_r4.1.1.so'
12-16 16:44:04.048: D/OpenCV::camera(10300): CameraWrapperConnector::connectToLib ERROR: cannot dlopen camera wrapper library /data/app/com.scrambled.kookstand-2/lib/arm/libnative_camera_r4.1.1.so, dlerror="dlopen failed ...
(more)
edit retag flag offensive close merge delete