28

On Linux my webcam works fine, but when using artificial lighting the white-balance is too reddish. Color look fine with natural illumination. Is there a way to calibrate the colors or have some form of auto-adjustment which works?

I used guvcview to tinker with the settings but haven't managed to find a suitable combination of settings to show natural colors.

SouravGhosh
  • 553
  • 5
  • 12
To Do
  • 1,296
  • 2
  • 12
  • 29

2 Answers2

33

At least on my webcam, the v4l2-ctl -l command shows two settings related to white balance:

# v4l2-ctl -l
[...]
 white_balance_temperature_auto (bool)   : default=1 value=1
[...]
      white_balance_temperature (int)    : min=2800 max=6500 step=1 default=4000 value=4000 flags=inactive
[...]

I must set the white_balance_temperature_auto setting to 0 before the white_balance_temperature setting will have any effect.

# v4l2-ctl -c white_balance_temperature_auto=0
# v4l2-ctl -c white_balance_temperature=3000  # or whatever value you want

Note that the white_balance_temperature setting controls what the camera assumes the lighting environment to be, so decreasing the value makes the camera assume the ambient light is more reddish, and so it will make the picture more bluish to compensate.

Use the -d option to use a specific video device like -d /dev/video0.

telcoM
  • 87,318
  • 3
  • 112
  • 232
2

There is now a functional GUI for v4l2-ctl: camset. In addition to white balance one might also have to adjust things like hue and saturation.