[c++] VideoCapture always returns a null image

asked 2015-03-26 13:08:27 -0500

davifumi89 gravatar image

updated 2015-03-26 15:09:15 -0500

Dear folks, I always used VideoCapture to take frames from web cams but since I've used an industrial camera (the david laser scanner one), VideoCapture objects always returns a null image. I've already known I have to change the ID numbers in the VideoCapture constructor but the problem still remains.

VideoCapture cap(0);

cap>>image; // this function return a null image

If I use grap and retrieve

bool t = cap.grab(); //returns true

t = cap.retrieve(image); //returns false

Does anyone know the reason why this problem happens?

I tried this new camera using skype and it works perfectly so it should not be neither an HW problem nor an OS driver one.

Thank you

edit retag flag offensive close merge delete

Comments

how did you check the device id of your camera ?

bvbdort gravatar imagebvbdort ( 2015-03-27 03:44:49 -0500 )edit