Electronic – Disabling the camera auto white balance

cameraspectrum analyzer

I've decided to use standard web-camera as a simple spectrograph, being inspired by this website (and this one too).
The device actually works, as you may see on the image:
Spectrograph software screenshot
But you may see on the image as well that the camera is trying to compensate the lack of brightness. Of course I need the input to be non-modified. I tried to use various software settings for the camera but none of them worked, so I assume that the camera does not accept them.
This means that I'll need to either find another camera which does accept the settings from software side or try to modify the camera electronics to prevent auto-exposure from working.
So a few questions can be implied from the text above:

  1. Is there a way to find a proper device for my purposes? (I can't afford buying tons of cameras to test this feature)
  2. Do you think this auto-exposure can be disabled by eg. removing one trace on the camera PCB or something similar? (as soon as I am home I'll provide some info about the camera)

Edit:
OK, so it turns out (after some testing in other programs), that the problem is not the auto-exposure, which can be turned off successfully through the OpenCV, but the automatic white balance correction of the webcam. Which is, sadly, unsupported in OpenCV. Does anyone know of any other way turn it off, be it software (preferred…) or hardware?

The cam is Trust SpotLight Webcam Pro.

Best Answer

Did you check camera properties? On Linux, install 'v4l2ucp', and run it while running your capture app. For at least 'Logitech Quickcam Pro for Notebooks', this shows the 'white balance' setting, with an 'auto' checkbox. We set it to 4000 for our outdoor camera to get true color reproduction. Once you test the camera with 'v4l2ucp', you can script it with 'v4l2-ctl'.

I know many Logitech and Microsoft webcams have the manual white balance setting; I have no idea about other models.

Also, most cameras use two-wire bus to control camera; this includes initial setup (resolution, data format, etc...) and white balance setting. So it is highly unlikely there is any wire you can cut to get fixed WB.