Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Unfortunately, setting the size of the capture doesn't always work. One of the reasons being that sometimes the camera simply doesn't support the dimensions you are trying to set.

According to this thread, you can try to use the old python interface (something like this):

from import *  
from opencv.highgui import *

capture = cvCreateCameraCapture(0)

cvSetCaptureProperty(capture, CV_CAP_PROP_FRAME_WIDTH, 640)
cvSetCaptureProperty(capture, CV_CAP_PROP_FRAME_HEIGHT, 480)

If this approach doesn't work, you'll have to resize the captured frame yourself! Check cv2.resize()