In my C/C++ program, I’m using OpenCV to capture images from my webcam. The camera (Logitech QuickCam IM) can capture at resolutions 320×240, 640×480 and 1280×960. But, for some strange reason, OpenCV gives me images of resolution 320×240 only. Calls to change the resolution using cvSetCaptureProperty() with other resolution values just don’t work. How do I capture images with the other resolutions possible with my webcam?
Share
There doesn’t seem to be a solution. The resolution can be increased to 640×480 using this hack shared by lifebelt77. Here are the details reproduced:
Add to highgui.h:
Add the function icvSetPropertyCAM_VFW to cvcap.cpp:
and edit captureCAM_VFW_vtable as following:
Now rebuilt highgui.dll.