Setting a consistent exposure with a usb webcam on osx

I’m using image filters on the outputs from Video Device In tops in Touch, and for them to work consistently I need to be able to set the exposure and make it constant. Since I’m on Mac OSX, DirectShow (WDM) is not an option so the exposure option in the top is not available. I can manually set the exposure by using the Logitech Gaming Software (support.logitech.com/software/lgs).

However, when ever I disconnect/reconnect the usb webcam these settings get reset.

Is there a way to set this programmatically through python or shell scripting for example?

I never tried it, but…
what if you would open the device with opencv then do all your settings, release it and let TD open it by enabling the video device in top.

i think i used macam for this but it was so long ago i can’t really remember.
webcam settings appears to do this. it has profiles and settings that can be loaded on startup.
DESCLAIMER: I have not tried this myself.
http://mactaris.blogspot.com/p/webcam-settings.html