Compensate for Auto White Balance with OpenCV
You could try interfacing your camera through DirectShow and turn off Auto White Balance through your code or you could try first with the camera software deployed with it. It often gives you ability to do certain modifications as white balance and similar stuff.
I'm working on an app that takes in webcam data, applies various transformations, blurs and then does a background subtraction and threshold filter. It's a type of optical touch screen retrofitting system (the design is so different that tbeta/touchlib can't be used).
The camera's white balance is screwing up the threshold filter by brightening everything whenever a user's hand is seen and darkening when it leaves, causing one of those to exhibit immense quantities of static.
Is there a good way to counteract it? Is taking a corner, assuming it's constant and adjusting the rest of the image's brightness so that it stays constant a good idea?