There are a huge number of questions and corresponding answers of people asking how to set the height / width of the frame. A small sample below:
- Unable to change frame height, width in OpenCV
- OpenCV (via python) on Linux: set frame width / height?
- Setting QuickCam Pro 3000 frame size with OpenCV?
- Increase camera capture resolution in OpenCV
I realized that OpenCV sometimes has problems setting the height / width of the frame. In my case, I can set the width / height range to 640 x 512. The drivers for the camera are provided by the manufacturer (ie not v4l2 or something like that). What debugging information can I provide or how can I help them understand why I cannot set higher width / frames. Is this a problem with drivers, with OpenCV with both?
import cv2 c = cv2.VideoCapture(1) c.set(cv2.cv.CV_CAP_PROP_FRAME_WIDTH, 1280) c.set(cv2.cv.CV_CAP_PROP_FRAME_HEIGHT, 1024)
I am using Ubuntu 14.04 and using OpenCV 2.4.8 in Python.
I found this question that has an accepted answer, suggesting that I should be able to make it work. I do not know how to do this part:
What you can do is study your camera driver, make a patch for OpenCV and send it to code.opencv.org. In this way, others will enjoy your work, just as you enjoy the work of others.
python opencv camera driver
evan54 Jan 13 '15 at 4:14 2015-01-13 04:14
source share