Setting video capture properties no longer works in OpenCV 2.2?
Asked Answered
S

2

6

Prior OpenCV 2.2, I was able to do

VideoCapture capture(0);
capture.set(CV_CAP_PROP_FRAME_WIDTH, 640);
capture.set(CV_CAP_PROP_FRAME_HEIGHT, 480);

in order to modify the frame size. But after when I compiled my application against OpenCV 2.2, setting the properties no longer works (the video is displayed correctly though). If I do a get of these values, 0 is returned. And if I look at the size of the captured frame, it is 160 x 120.

I searched online but most of the posts were about the problem in Linux whereas I am running Windows 7 64-bit. My webcam is a Logitech QuickCam Ultra Vision.

Is there anyone experiencing the same problem? Or no problem at all?

Thanks in advance!

Smallish answered 29/5, 2011 at 7:32 Comment(1)
Works again in OpenCV 2.4.5, tried it few minutes ago :)Boathouse
S
2

This problem has been solved in OpenCV 2.3, even with my old Logitech QuickCam Ultra Vision webcam.

Smallish answered 23/7, 2011 at 3:53 Comment(0)
D
0

May be you should try with VideoInput, which is also supported by OpenCV, and included in OpenCV 2.0.3. See an example at http://opencv.willowgarage.com/wiki/CameraCapture

Deepdyed answered 29/5, 2011 at 21:39 Comment(1)
Thank you very much! I was actually trying to use the C++ interface. However, I tried the Logitech Orbit cam on another computer and it worked just fine. Although I have updated both drivers, I am still not sure if the same driver is used for both webcams.Smallish

© 2022 - 2024 — McMap. All rights reserved.