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

asked 2018-07-11 14:50:27 -0500

omatrot gravatar image

updated 2018-07-11 14:51:11 -0500

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 ? 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.

edit retag flag offensive close merge delete