I've been trying to use OpenCV to control my webcam (Logitech c910) through python. I 've managed to capture images through .read() but they are 640 x 480 and I haven't managed to set the resolution to the max which is 2592 x 1944.
I used to have opencv 2.4.8 but now I have 3.0.0-dev
Here is the code I try and the outputs:
In : import cv2 In : cap = cv2.VideoCapture(1) HIGHGUI ERROR: V4L/V4L2: VIDIOC_S_CROP In : cap.open(1) HIGHGUI ERROR: V4L2: Pixel format of incoming image is unsupported by OpenCV Out: True In : r,f = cap.read() VIDIOC_STREAMON: Bad file descriptor In : r Out: False
I installed 3.0.0-dev following the instructions from this other question I posted. How to install opencv 2.9 for python?
The reason I went with the dev version is because in this post someone said that resolved their problem. http://answers.opencv.org/question/2061/how-to-set-resolution-of-video-capture-in-python/