Ask Your Question
0

openCV VideoCapture isOpened() returns false on Android

asked 2014-03-22 15:06:36 -0600

GGILOYAN gravatar image

updated 2014-03-22 15:09:44 -0600

berak gravatar image

Hi everyone Please help

I whant to record video using openCV on Android device, but always VideoCapture isOpened returns false

VideoCapture cap(0); //VideoCapture cap(CV_CAP_ANDROID_BACK);

if(!cap.isOpened()) { QMessageBox::information(this, tr("error"), "error on open"); } else { QMessageBox::information(this, tr("success"), "is opened"); }

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-03-23 06:22:53 -0600

Darius gravatar image

hello, did you tried VideoCapture cap(-1) or VideoCapture cap(1)?

edit flag offensive delete link more

Comments

Yes I tried -1 and 1. It's again doesn't work :(

GGILOYAN gravatar imageGGILOYAN ( 2014-03-23 08:51:47 -0600 )edit

try checking if lib paths are correct. im talking about correct compiler and debuger setup (i had this problem too, btw i didin't managed to set up OpenCV with Win7 x64 and Visual Studio 2012 and 2010)

Darius gravatar imageDarius ( 2014-03-23 11:34:29 -0600 )edit

I think if path was incorrect then application doesn't compile and release apk file. I am using Qt Creator and that code does works for windows. It does't work only on Android!

GGILOYAN gravatar imageGGILOYAN ( 2014-03-23 13:38:45 -0600 )edit

Question Tools

Stats

Asked: 2014-03-22 15:06:36 -0600

Seen: 2,349 times

Last updated: Mar 23 '14