4
\$\begingroup\$

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.

\$\endgroup\$
4
  • 1
    \$\begingroup\$ Exposure control will almost certainly be embedded within the controller / firmware. Do you need real-time results? If not a P&S camera with manual mode and transferring the image via USB or memory card may be an option. \$\endgroup\$
    – PeterJ
    Commented May 20, 2013 at 12:00
  • \$\begingroup\$ We considered that, but we do need the real time display if possible. Besides that, the resulting device would be very expensive. \$\endgroup\$ Commented May 20, 2013 at 12:02
  • 1
    \$\begingroup\$ It is very difficult to say if it's possible to disable the autoexposure feature of your webcam without knowing what kind of webcam it is, what kind of sensor does it use etc.; still, I'm quite sure that if its proprietary software has the ability to compensate for exposure, then there is some way to disable that option via software... but it may need you to directly interface to the webcam, rather than relying upon its driver. You should get the raw stream of data directly from it, and then use it for your purpose. I'm waiting for more info on this. By the way, that's neat stuff :) \$\endgroup\$
    – MickMad
    Commented May 20, 2013 at 13:04
  • \$\begingroup\$ Getting the raw stream is impossible due to my lack of knowledge about the topic. Currently, I'm using OpenCV to get the camera input, as that was the only library I got to work. I will make sure to add more info when I'm at home. \$\endgroup\$ Commented May 20, 2013 at 13:18

1 Answer 1

1
\$\begingroup\$

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.

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.