Enable Auto Exposure using code
I've had trouble with this before hen trying to disable the Auto Exposure on my webcam, I managed to do it by setting the CV_CAP_PROP_EXPOSURE value which automatically disabled the Auto Exposure.
I'd now like to be able to turn it back on for a few seconds and then disable it again but any value I set for CV_CAP_PROP_AUTO_EXPOSURE doesn't seem to take yet I can open a dialog with CV_CAP_PROP_SETTINGS and enable it from within that popup.
There must be a way to enable this through code if it's possible through the Settings dialog.
I thank you for your time and any help you can offer.
I'm having the same trouble except my camera doesn't respond when I try to set the exposure. After I set it I can get the value and the value has changed but the camera still returns an overexposed image as if I haven't changed the value. I'd be happy to build a patch for OpenCV if I could figure out how this particular camera works. Can someone point out where to start poking around in the code? I know it can be done because the software that came with the camera has an exposure feature and is adjustable from their GUI. I'm using Qt Creator on windows 7 in C++. The camera is a MicroView USB Microscope ($80) from adafruit.
I don't know if this will help you but I've had some success by setting the exposure value then calling QueryFrame twice and set the exposure value again. The next QueryFrame after that might come out with the expected value. This might not help with your particular camera but it seemed to work with mine and it doesn't help with the original question.