Ask Your Question

OpenCV for Android & HTC One X

asked 2013-03-19 08:54:31 -0600

alvise gravatar image

Hi everybody,
I'm working on a Opencv project that I test on a HTC One X. Since I need to use the camera, I was wondering if there are differences between using the class VideoCapture from the Java code and using the same class through a native C++ code.
Now I'm trying to work using native code and displaying the camera preview frames using OpenGL, but I'm getting all black frames...maybe the camera is not supported? From the logcat I don't see any error messages and the camera capabilities, resolutions and so on are all displayed.
Does anybody have experienced a similar problem? Maybe using the VideoCapture java class can solve the problem?

thank you

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2013-03-19 12:57:00 -0600

  1. VideoCapture class in Java is JNI wrapper for C++ cv::VideoCapture implementation. So, both C++ and Java camera works ok, if you configure camera correctly.

  2. There is known issue in OpenCV VideoCapture on Android 4.0.x. Problem can be fixed by updating your phone up to Android 4.1.x.

edit flag offensive delete link more



thank you for you time, much appreciated! I'm using the stock version 4.1.1, the last update and the last OpencvManager...

Anyway thank you!

alvise gravatar imagealvise ( 2013-03-19 13:46:56 -0600 )edit

Question Tools


Asked: 2013-03-19 08:54:31 -0600

Seen: 286 times

Last updated: Mar 19 '13