Force IR-only mode on Arducam IMX462 USB camera for consistent day/night insect monitoring?

I’m using an Arducam 2MP IMX462 Day and IR Night Vision USB Camera for a scientific insect monitoring project. I have a Python script that captures consecutive images and saves them only if they differ by a certain percentage threshold. The problem is that the camera automatically switches between visible-light mode and IR mode depending on ambient light. This means my images are inconsistent — some are normal visible-spectrum and some are IR — which makes the comparison logic unreliable. I want the camera to stay in IR mode all the time, even in bright daylight, so all my images are consistently IR for the script to work with a single set of parameters. I reached out to the reseller (Antratek) about this and they basically told me it ‘makes little sense to turn on IR during the day since the camera doesn’t produce better images than with IR off.’ But for insect monitoring, consistent IR imaging day and night is the whole point. Is there any way to force this camera into IR mode continuously through software, ideally from Python?

That use case makes perfect sense — consistent IR across all lighting conditions would definitely simplify your comparison pipeline. The reason you’re seeing this behavior is that the camera has an IR-Cut filter that’s controlled by a photoresistor on the camera board itself. When ambient light is bright, the photoresistor detects it and the hardware automatically engages the IR-cut filter, blocking infrared and giving you a standard visible-light image. When it gets dark, the photoresistor triggers the filter to disengage, switching to IR mode. So the switching is entirely hardware-driven — no software command is going to override that photoresistor while it’s still on the board. To force the camera to stay in IR mode regardless of ambient light, the first step is a hardware modification: the photoresistor on the camera board needs to be physically removed.

Okay, so the photoresistor is what’s blocking software control of the IR-cut filter. That explains why I couldn’t find any software setting for it. A couple of questions — is removing the photoresistor something doable myself, and does doing so void the warranty? Also, once it’s out, what’s the actual software side look like? How do I tell the camera from Python to keep the IR filter disengaged?

Just to be upfront — yes, removing the photoresistor will void the warranty. It’s a one-way hardware modification, so worth considering before you proceed. As for the procedure itself, Arducam has a detailed guide covering the manual IR-cut filter control workaround here: Quick start - Arducam Wiki — that walks through identifying and removing the photoresistor on the board, and then how to control the IR-cut switcher manually through software. Once the photoresistor is gone, you can toggle the IR-cut filter via GPIO or the appropriate camera register from your Python script. You’d just set it to keep the IR filter removed at all times, and your capture-and-compare script can then work with consistent IR images whether it’s noon or midnight.

Thanks, I’ll look through that documentation. One thing I want to clarify though — I’m using the USB version of this camera, connected to a desktop machine, not the CSI ribbon cable on a Raspberry Pi. The guide you linked seems to reference Raspberry Pi GPIO pins. Will the same approach work over USB? I mean, after I remove the photoresistor, how do I actually reach the IR-cut control from Python running on a regular PC?

Good catch — since you’re on the USB variant rather than the CSI ribbon connection, the control path is different from the direct GPIO approach in the guide. The photoresistor removal is still the essential first step regardless. But for USB-connected operation, you’ll want to check how the IR-cut control register gets exposed over the UVC/USB interface. Some of these camera modules expose the IR-cut toggle through UVC extension controls, and you might be able to see it with something like v4l2-ctl --list-ctrls on Linux once the photoresistor is no longer overriding things. It’s also possible the camera’s firmware exposes a vendor-specific control that becomes accessible only after the hardware mod. The documentation I linked covers the general principle and the hardware side — for the USB-specific software path, you may need to experiment with what controls become visible through the UVC interface after the mod. The bottom line is: remove the photoresistor first, then see what the camera exposes. Without that step, the hardware will keep overriding anything you try to send over USB.