Model number of the product(s)?
Arducam 2MP OV2311 Global Shutter M12 Mount NoIR Mono Camera Modules for NVIDIA Jetson Nano/NX and Jetson Orin NX.
SKU: B0221
What hardware/platform were you working on?
Jetson Xavier NX (Developer Kit), JetPack 5.0.2
Instructions you have followed. (link/manual/etc.)
Quick Start Guide Arducam Wiki for Jetvariety-Camera MIPI_Camera example
Problems you were having?
Failed to control camera with openCV-python… First, i tried to use GStreamer pipeline, but there was a lot of mistakes. For instance, I used from quick guide:
And it said could not link v4l2src0 to videoconvert0, neither element can’t handle caps… also on the picture. I checked, that openCV has GStreamer in build.
After this, and according to MIPI_Camera example, I used cap = cv2.VideoCapture(0, cv2.CAP_V4L2), and it works!
For resize, I use cap.set(cv2.CAP_PROP_FRAME_WIDTH, 1600) and cap.set(cv2.CAP_PROP_FRAME_HEIGHT, 1300), it also works!
But when I use
cap.set(cv2.CAP_PROP_AUTO_EXPOSURE, 0.75) # tried different num
cap.set(cv2.CAP_PROP_EXPOSURE, 1/100) # tried different num
Troubleshooting attempts you’ve made?
Toubleshoot Arducam Wiki for Jetvariety-Camera
Also found topics in this and NVIDIA forum with same problem, but without any success.
What help do you need?
How can i control exposure with openCV?
Controlling exposure requires firmware support.
To access all the controls, you can use the v4l2-ctl tool. This tool provides a comprehensive list of controls that can be adjusted to optimize exposure settings for your device. Have you used this tool before, or do you need further guidance on how to use it?
Thanks a lot!
I deal with my task:
First, launch camera cv2.VideoCapture(0, cv2.CAP_V4L2), then, in the loop, I can change exposure by executing bash command os.system(f'v4l2-clt -c exposure={exposure}').
Do you know, is there another way to change exposure right in opencv?
I haven’t auto_exposure flag in the list of v4l2-ctl -l, so it doesn’t need to on?
Anyway, tried set this, it doesn’t work… Also tried CAP_PROP_AUTO_EXPOSURE = 0.25,0.75, 1, -1, 3, -3.
And when use
cap.set(cv2.CAP_PROP_EXPOSURE, 1) # also -10, 1/10, 10
exposure doesn’t change, and function return false state