Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

C++ NDK cv::VideoCapture.open(0) return false on Android

I'm using OpenCV 3.4.1 compiled as a shared native library (ie: libopencv_world.so) on Android (armeabi-v7a). I'm facing the following problem: cv::VideoCapture.Open(0) always return false. Is there a way to ask the framework for the real error here ?

I think I've set the correct permissions in the manifest, though the app is not asking for permission to access the camera. Is this supported on Android.

I ask because the same code works fine on iOS with OpenCV installed with Cocoa Pods. The app asks for camera access.

C++ NDK cv::VideoCapture.open(0) return false on Android

I'm using OpenCV 3.4.1 compiled as a shared native library (ie: libopencv_world.so) on Android (armeabi-v7a). I'm facing the following problem: cv::VideoCapture.Open(0) always return false. Is there a way to ask the framework for the real error here ?

I think I've set the correct permissions in the manifest, though the app is not asking for permission to access the camera. Is this supported on Android. Android ? Is there anything to do before that call ?

I ask because the same code works fine on iOS with OpenCV installed with Cocoa Pods. The app asks for camera access.