Opencv 3.2 With Python 3 Videocapture Changes Settings Of V4l2
I worked with OpenCV 3.2 with Python3 and SBC OXU4. I have a true 5MPx web-camera connected to SBC. I want to take from this camera 2592x1944 resolution picture. If I use Cheese I
Solution 1:
OpenCV automatically selects the first available capture backend (see here). It can be that it is not using V4L2 automatically.
Also set both -D WITH_V4L=ON
and -D WITH_LIBV4L=ON
when building.
(Unrelated to the question) In order to set the pixel format to be used set the CAP_PROP_FOURCC
property of the capture:
capture = cv2.VideoCapture(cam_id, cv2.CAP_V4L2)
capture.set(cv2.CAP_PROP_FOURCC, cv2.VideoWriter_fourcc('M', 'J', 'P', 'G'))
Post a Comment for "Opencv 3.2 With Python 3 Videocapture Changes Settings Of V4l2"