Opening 720p webcam with OpenCV 2.4.5 (and unicap) [closed]
Hello
I just reinstalled OpenCV to activate TBB and also added the unicap option during cmake. So far, I used a webcam that can provide 1280x720 images. So far, I used
cap = VideoCapture(1);
cap.set(CV_CAP_PROP_FRAME_HEIGHT,720);
cap.set(CV_CAP_PROP_FRAME_WIDTH,1280);
to connect to the camera which worked perfectly. If I now try to open the stream as before, no Image is read (cap.read(rgb) does not return). If I uncomment the cap.set lines, I get a 720p image, but only the upper left 640*480 pixels contain the full image and the rest is just black.
I am not sure if unicap has something to do with it, so it's just a guess. Has anyone experienced this problem before?
Cheers, Nikolas
Could you try using: Mat rgb; cap >> rgb;
to see if this solves the problem. Using this all formatting is done correctly and automatic with preset properties. It works for me.
no, same behavior. (I just get a VGA image)