Arducam B0292 camera gives inconsistent images after reboot with Python OpenCV on Windows 10

Hi everyone, I’m having a strange issue with my Arducam B0292 camera. I’m using Python with OpenCV on Windows 10 to capture images of 7-segment displays so I can check whether each segment is on or off. I’ve disabled the auto properties and set my own brightness/focus/etc. in code, but every time I reboot the PC or unplug and reconnect the USB camera, the images come out completely different with the same code. Sometimes brightness and focus look fine, other times there’s almost no brightness or it’s way overexposed, even though the test conditions are identical. Has anyone run into this?

Thanks for the details. Quick question first: when you say you disable the auto properties, are you doing that through code (for example setting CAP_PROP_AUTO_EXPOSURE or CAP_PROP_AUTO_WB in OpenCV) or through some separate camera software/utility? It matters, because these UVC cameras behave differently depending on where the settings get applied.

I’m doing it in code. Every time the script runs it sets all the camera properties again — I don’t rely on any external software. So on each run the auto settings get disabled and my custom values get applied. But the results still vary after a reboot or a USB reconnect.

That’s a good starting point. One thing to be aware of: this camera does not persist any custom properties across a power cycle. As soon as it powers on again — whether from a reboot or a USB reconnect — it goes back to its default state and anything set previously is lost. So the properties need to be re-applied after every power-on/reset. Setting them once isn’t enough.

Right, and that’s exactly what I’m doing — I set the properties on every single run, not just once. The code disables auto and applies my custom values each time it starts. But even with that, after a reboot or reconnect the images are still inconsistent. Same code, same setup, but sometimes brightness is almost zero and sometimes it’s blown out.

Got it, thanks for clarifying. Setting them programmatically on every run is the right approach, and it rules out the simple ‘settings were lost after power cycle’ explanation. Since the values are being re-applied and the images still differ, I’d like to take a closer look at exactly how and when you’re setting them. Could you share the relevant part of your code — the functions that set the camera properties and capture the images?

Sure, I’ve attached the Python file. It contains the functions I use for setting the camera properties and capturing the images. Let me know if you need anything else from it.

Thanks, I’ve received the code and I’m reviewing it now. From what you’ve described so far, the key fact is that the properties are being set on every run, so the inconsistency after reboot/reconnect is a bit unusual. I’m still working through the setup/capture sequence in your script to see if there’s a timing issue or something being applied before the camera has fully initialized. I’ll follow up once I’ve had a closer look.