Opening 720p webcam with OpenCV 2.4.5 (and unicap) [closed]

asked Jul 2 '13

NikolasE gravatar image

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

Preview: (hide)

Closed for the following reason question is not relevant or outdated by sturkmen
close date 2020-10-04 15:04:36.275321

Comments

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.

StevenPuttemans gravatar imageStevenPuttemans (Jul 3 '13)edit

no, same behavior. (I just get a VGA image)

NikolasE gravatar imageNikolasE (Jul 3 '13)edit