On my Laptop, running Ubuntu 20.04, i only get 18.75 fps (1). However, the images streamed have resolution 3280x2464 (2)(ONLY OPTION!) which I have to downscale each frame. This significantly lowers fps to around 10 fps. While that is specific to my application even 18.75 is a significant dip compared to 25 fps.
I haven't found a way to set the camera resolution to desired values (eg 640x480)
cap.set(cv2.CAP_PROP_FRAME_WIDTH, target_width) returns true (3) but when checking the actual resolution it's still 3280x2464 (On linux as well as Windows)
Is this intended behaviour? If not, is there a way to configure the camera?
(1)
$ v4l2-ctl -d /dev/video2 --stream-mmap --stream-count=200 --stream-to=/dev/null
-> 18.75 fps
(2)
$ v4l2-ctl -d /dev/video2 --list-formats-ext
-> ioctl: VIDIOC_ENUM_FMT
Type: Video Capture
[0]: 'MJPG' (Motion-JPEG, compressed)
Size: Discrete 3280x2464
Interval: Discrete 0.040s (25.000 fps)
(3)
Requested resolution set: 640x480, width_ok=True, height_ok=True
Requested resolution: 640x480, Actual: 3280x2464
On my Laptop, running Ubuntu 20.04, i only get 18.75 fps (1). However, the images streamed have resolution 3280x2464 (2)(ONLY OPTION!) which I have to downscale each frame. This significantly lowers fps to around 10 fps. While that is specific to my application even 18.75 is a significant dip compared to 25 fps.
I haven't found a way to set the camera resolution to desired values (eg 640x480)
cap.set(cv2.CAP_PROP_FRAME_WIDTH, target_width)returns true (3) but when checking the actual resolution it's still 3280x2464 (On linux as well as Windows)Is this intended behaviour? If not, is there a way to configure the camera?
(1)
(2)
(3)