Hi all. I’m trying to control a 16MP IMX519 motorized focus USB 3.0 camera module on Windows 10 using Python OpenCV over USB. The only camera parameters I can actually control are Brightness, Saturation and Contrast — and I’m hardly successful in getting even 2 of them to respond reliably. I really need gain control. I already tried setting Brightness to manual gain mode, but gain still won’t respond. The weird part is that the same IMX519 camera works easily on Raspberry Pi OS, but on Windows 10 it behaves poorly. Does anyone have Python OpenCV code or a Python library that can set all the standard camera parameters on Windows?
Thanks for the details. Before changing the gain value, auto exposure needs to be disabled first — otherwise the gain change won’t take effect, because AE keeps overwriting it. So try disabling auto exposure first, then write the gain value, and check the image. We’re also preparing a small Python example for controlling these cameras on Windows; I’ll update once it’s ready. In the meantime, could you share the exact calls you’re using to disable auto exposure and set gain? That’ll help narrow down whether it’s a code issue or something lower level.
I already checked with auto exposure off and it still doesn’t work. My test looks roughly like this:
import cv2
cap = cv2.VideoCapture(0, cv2.CAP_DSHOW)
cap.set(cv2.CAP_PROP_AUTO_EXPOSURE, 0)
cap.set(cv2.CAP_PROP_GAIN, 50)
print(cap.get(cv2.CAP_PROP_GAIN))
I also tried AUTO_EXPOSURE 0.25. The printed gain either doesn’t change, or it changes but the image brightness stays exactly the same. Brightness works, gain doesn’t. This is blocking our project with these USB Arducam cameras — our local integrator almost rejected them because basic parameters like this aren’t available. Is there a Python library that covers all the basic parameters on Windows?
Thanks for the snippet — that helped. We reproduced the same behavior on Windows, and it turns out the exposure/gain control needed a firmware fix, not just the right OpenCV sequence. We’ve prepared a firmware update package and a simple demo script for it. I’ve sent you the Arducam16MP_firmware_update folder (including the guide video) and the Control.py demo through private message — please check your inbox. Follow the guide video to update the firmware first, then use Control.py to set exposure, gain and the other controls. To summarize the current state: on Windows, exposure/gain control for this module required a firmware update, so the workaround right now is to update the firmware and use the provided Control.py script.