How can I control the automatic gain of a webcam?

I'm working with the Image Acquisition Toolbox and I'm facing a problem with the automatic gain of my camera. I need to keep a fixed gain (automatic gain disabled) and I would like to know if there is a possible solution to control it.
Also I would like to know if there are some cameras which are compatible with Matlab and have the capability to control the automatic gain.
Thank you very much in advance!

 Accepted Answer

There should be a command to turn AGC (Automatic Gain Control) off, at least if it's a smart enough camera. If you don't see it in imaqtool then contact the manufacturer. Otherwise get a good machine vision camera. It's possible a cheap webcam doesn't have an "AGC off" setting.

3 Comments

Thank you for you response Image Analyst.
The imaqtool only let me set some settings of the camera. I set the following configuration in Device Properties tab before capture a video:
src.BacklightCompensation = 'off';
src.Gain = 30;
src.WhiteBalanceMode = 'manual';
src.FrameRate = '30.0000';
But this configuration doesn't fix the problem.
As you mentioned I suppose the camera doesn't have this capability since is a simple webcam (Logitech Webcam C120). Do you know any camera model I can acquire to solve this problem?
I use cameras from Lumenera, like the Lw575 or Lw11059c. They are supported by an adapter that works with the Image Acquisition Toolbox and imaqtool. You can control virtually everything you can possibly imagine in the camera.
Thank you again Image Analyst. I'm going to investigate into these cameras.

Sign in to comment.

More Answers (0)

Asked:

on 3 Dec 2014

Commented:

on 3 Dec 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!