Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

error setting resolution of video capture device

Hi,

I have problems setting the resolution of the video capture devices I'm using.

I have two webcams (HP HD webcam (built-in) and Mercury USB webcam (external)) and they all use only the default resolution defined by the DEFAULT_V4L_HEIGHT/WIDTH variables in the cap-v4l.cpp file; changing the resolution won't work:

capturedevice.set(CAP_PROP_FRAME_WIDTH, W);
capturedevice.set(CAP_PROP_FRAME_HEIGHT, H);

The resolutions I try to set are supported by the webcam and the return value of the set function is 0 (success). Changing the resolution in other programs works.

Do you have any idea why does only the initial set resolution call work? Any possible solutions for the problem?

I'm using the latest version of OpenCV compiled from source on Ubuntu 13.10 64bit.

click to hide/show revision 2
added info, see [Edit].

error setting resolution of video capture device

Hi,

I have problems setting the resolution of the video capture devices I'm using.

I have two webcams (HP HD webcam (built-in) and Mercury USB webcam (external)) and they all use only the default resolution defined by the DEFAULT_V4L_HEIGHT/WIDTH variables in the cap-v4l.cpp file; changing the resolution won't work:

capturedevice.set(CAP_PROP_FRAME_WIDTH, W);
capturedevice.set(CAP_PROP_FRAME_HEIGHT, H);

The resolutions I try to set are supported by the webcam and the return value of the set function is 0 (success). Changing the resolution in other programs works.

[Edit:] I also get the "HIGHGUI ERROR: V4L/V4L2: VIDIOC_S_CROP" message in terminal.

Do you have any idea why does only the initial set resolution call work? Any possible solutions for the problem?

I'm using the latest version of OpenCV compiled from source on Ubuntu 13.10 64bit.