B0268 - Unable to change resolution in OpenCV

1.Which seller did you purchase the product(s) from?
Amazon
2.The Model number of the product(s) you have purchased?
B0268
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

w=3840

h=2160

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

camera.set(3,w)

camera.set(3,h)

ret,frame=camera.read()

cv2.imwrite("CV2_Image.jpg,frame)

camera.release()

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

Hello,

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

Hi,

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?

Hi,

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.