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.

  • Did you try VLC? It has a lot video related tools. – baselab Dec 21 '17 at 11: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 divice like -d /dev/video0.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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