B0268 - Unable to change resolution in OpenCV

1.Which seller did you purchase the product(s) from?
2.The Model number of the product(s) you have purchased?
3.Which Platform are you using the product(s) on?
Raspberry Pi 4
4.Which instruction are you following?

5.Has your product ever worked properly?
Never Worked
6.What problems are you experiencing?
I recently purchased a B0268 (16MP USB Camera) to use with my Raspberry Pi.

I’m using a very basic OpenCV script and I am able to change the default resolution of the camera.

import cv2



camera=cv2.VideoCapture(1) #confirmed this is the correct camera






This produces a 1024x768 image regardless of what w an h are set to
7.What attempts at troubleshooting have you already made?
Ive tried different cameras to see if I was able to change their resolution and I was able to
8.How would you like us to help you?
Please provide corrective steps to identify how to control resolution within cv2


You should ensure if the video1 node exist the resolution you set.

Please use v4l2-ctl --list-formats-ext -d 1 to check the camera’s detail information.


Yes - I have confirmed that the desired resolution is available using v4l2


Please try this test demo I attached for you.


Please try this test demo I attached for you.

Thank you - I continued playing with things and realized that I was only able to change the resolution to larger resolutions with MJPG formatting. Once I set that in OpenCV I was able to change the resolution.

I have noticed that the camera is performing very poor in low light conditions and it appears that it will not budge from 30FPS. Will autoexposure not allow the camera to reduce FPS in order to achieve a better image?


Yes, when the light is low, the exposure time will be increased to reduce the frame rate. In order to prevent the frame rate from being too low in low light conditions, the firmware has made some restrictions.