Quantcast
Channel: OpenCV Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 41027

OpenCV4Android 3.0: VideoCapture doesn't open

$
0
0
Hi, I want to open the camera from the native code using the OpenCV SDK for android (native) version 3. I am trying using android Nexus 5 android 5.0.1 My android.mk file: LOCAL_PATH := $(call my-dir) OPENCV_CAMERA_MODULES:=on OPENCV_INSTALL_MODULES:=on include $(CLEAR_VARS) include D:\folder1\OpenCV-android-sdk\sdk\native\jni\OpenCV.mk LOCAL_C_INCLUDES := D:\folder1\OpenCV-android-sdk\sdk\native\jni\include OPENGLES_LIB := -lGLESv1_CM OPENGLES_DEF := -DUSE_OPENGL_ES_1_1 LOCAL_LDLIBS += -lGLESv1_CM -ldl -llog LOCAL_MODULE := NativeCamera LOCAL_SRC_FILES := Camera.cpp include $(BUILD_SHARED_LIBRARY) The c++ code : #include #include #include #include #include #include #include #include #include #include #include ...... ...... JNIEXPORT void JNICALL Java_com_example_opencvnativecamera_Native_initCamera(JNIEnv*, jobject,jint width,jint height) { LOG("Camera Created"); capture.open(CV_CAP_ANDROID + 0); capture.set(CV_CAP_PROP_FRAME_WIDTH, width); capture.set(CV_CAP_PROP_FRAME_HEIGHT, height); ...... } Could you please help me in figuring out what is the problem ? libraries are correct ? Are there any libs missed ? Thanks,

Viewing all articles
Browse latest Browse all 41027

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>