Gain Control / AGC for Video Surveillance Guide

By IPVM Team, Published Apr 23, 2015, 12:00am EDT

Gain control is a critical, though often overlooked, factor in low light surveillance video. It is generally only noticed when the negative side effective of aggressive gain levels are seen, namely noise / snow on screen. The picture below, from one of our parking lot tests, is a prime example of this problem:

Clearly, the noise is a problem and ideally you would want to remove it. This raises important questions about how to use gain control effectively.

In the introductory video below, we provide a real-time demonstration of gain control:

To learn more, we conducted a series of experiments in a variety of scenes. For each scene, we captured video, images and bandwidth consumption. Here are the scenes we tested:

  • Black and White Mode .5 Lux (Dark)
  • Black and White Mode 20 lux (Low Light)
  • Color Mode 4 Lux (Moderately Dark)
  • Color Mode 300 Lux (Daytime)

Our testing was done across 3 HD cameras from Avigilon, Axis and Bosch to see a range of performances.

Inside the Pro section, we share our results and answer the following key questions:

  • How significant does image quality vary with different gain control settings?
  • Should you use gain control?
  • What is the right gain control settings to use?
  • What alternatives should you seek to using gain control?
  • How do manufacturers approach to gain control differ?
  • How does gain control differ between Black & White and Color modes?
  • What is the bandwidth impact of different gain control settings? What impact does light levels have on bandwidth impact?
  • What impact do VBR and CBR streaming modes have on using gain control?
  • What impact does digital noise reduction (include 2D and 3D DBR) have?

Key Findings

Let's start with the key findings of our tests:

  • Gain Control Very Important: In almost any night time scenes, without gain control, surveillance video would be very dark and almost practically useless. While gain control is generally ignored, its role is critical. In low light conditions, trying to turn it off to remove the grain/noise will only result in far worse video quality.
  • Gain Control is Automatic: As the name states, Automatic Gain Control, is automatically controlled by almost every camera. While it can produce lots of noise, disabling it generally will make things even worse.
  • Aggressive AGC: Unlike in commercial videography where gain control is used minimally and in moderation, surveillance camera manufacturers tend to use massive amounts of gain control. This is necessary because unlike film production, it is very hard to control scene lighting in surveillance.
  • Adjusting Gain Control: If you want to minimize the bandwidth impact and visual noise inherent in gain control, the two gain adjustments possible are (1) fixing the gain or (2) capping the gain. The former is dangerous unless you can guarantee constant lighting. The latter, assigning a cap, can be useful.
  • Gain for B&W and Color: Both B&W and Color modes use gain and display similar characteristics - bandwidth spikes, visual noise, etc. The big difference is that cameras activate gain at much higher light levels for color than in black & white modes (color at ~50 lux, b&w at ~20 lux).
  • Gain and Bandwidth Increases Tightly Correlated: As gain increases, bandwidth increases as well in a hockey stick curve. Interestingly, this appears to occur regardless of the light level or mode used.
  • Use MBR: Since bandwidth is nearly guaranteed to spike as gain increases, we strongly recommend setting a maximum bit rate.

Below is a video that shows and explains our key findings with references to our test video and images:

Join IPVM Newsletter?

IPVM is the #1 authority in video surveillance news, in-depth tests, and training courses. Get emails, once a day, Monday to Friday.

Join IPVM Newsletter?

IPVM is the #1 authority in video surveillance news, in-depth tests, and training courses. Get emails, once a day, Monday to Friday.

Configuring and Optimizing Gain

Gain is generally controlled by two modes:

  • Levels: For example, high, medium, low - this is a coarse grained control.
  • dB: For example, 0dB, 15dB, 30dB, etc. A fine gain control, the range tends to be from 0dB (off) to 45dB or higher (very aggressive).

Gain is controlled typically in one of three approaches:

  • Auto: By default, most cameras automatically determine what level gain should be.
  • Fixed: As an alternative, a user can lock gain to a specific level (e.g., always 6 dB). This can be dangerous - if you do this at too low a level (like 6dB) and the scene becomes even moderately dark (say 5 lux), the image quality is going to be quite poor. On the other hand, if you set it at a high level (say 27 lux) and the scene becomes bright, the image will be distorted by heavy grain / noise.
  • Cap: Some cameras allow the admin to cap the maximum gain the camera can choose. This allows the camera the autonomy to fluctuate the gain but blocks it from going too high for an admin's preference. This can be useful for reducing some visual noise and reducing bandwidth spikes. However, of course, keep in mind such caps will make the image darker than possible with max gain.

The video below provides demonstrations on how to use and optimize gain using Axis and Bosch cameras as an example:

Gain Not Comparable Across Manufacturers

Beware, even if 2 manufacturers list the same gain levels (e.g., 20dB or 35dB), it does not mean they are the 'same' or deliver the 'same' low light performance. How they add gain / process video can widely vary.

Gain and Super Low Light Performance

You may be aware of manufacturers marketing super low light performance, with names like LightFinder, LightCapture, Stellar, DarkFighter, etc. All of these are using advanced forms of gain control to improve low light image quality. However, like 'traditional' gain control, they tend to increase bandwidth consumption further (though by how much varies depending on the noise reduction techniques they use). Super Low Light does not, however, require IR nor special imagers. The special functionality comes from advanced gain control / image processing.

They are not all equal and they cannot be compared abstractly. You can review our tests, e.g., Super Low Light vs Integrated IR Shootout and individual camera reports to see low-light performance.

Varying Gain Control Demonstrations

To get a sense of how gain impacts overall video quality, the below comparisons show the same scene with the same lighting with different gain levels. The top image has the maximum amount of gain with each descending image at a lower gain level. Take a look:

In the above scene, almost anyone would agree that the top image is the best. With this dark scene, high gain becomes critical to make anything out. Indeed, even with 3dB of gain, the scene is pitch black.

Let's contrast to another slide below with 40x the amount of light. Take a look:

Which do you think is better? This one is certainly much more complex than the first slide with sub 1 lux lighting. In this scene, with 20 lux, the image with maximum gain is somewhat dark and suffers from a lot of visual noise. The images actually look better with less gain, though one could debate which of the low gain images were best. As a point of reference, we estimate this camera's automatic gain setting for this scene to be about 6 to 9 dB.

Color Mode - Gain Impact

The same tradeoffs with gain variance occurs with color mode. The big difference, as the comparison below shows is that with color, gain is needed more even at higher light levels. By default, at 4 lux, all 3 cameras automatically adjusted their gain control to maximum levels. You can see this with the clear visible noise across each image.

color mode-gain max vs disabled 4 lux

By contrast, with gain disabled, the images are significantly darker and the colors are more subdued (Bosch), missing (Avigilon) or altered (as in the case with the Axis camera).

Gain's Impact on Bandwidth

One of the most oft cited problems of low light surveillance is increased bandwidth consumption. Perhaps the most interesting finding of this test is the strong correlation of gain levels and bandwidth, regardless of the mode of the camera or the light level of the scene.

Below is a chart that depicts the relationship. The numbers are based on .5 lux B&W mode for Axis though the same pattern was displayed with higher light levels, color mode and the Avigilon camera.

The bandwidth penalty becomes increasingly steep as gain levels increase. We have noticed some cameras with very high noise and very high bandwidth consumption in low light. This looks to be an outcome of manufacturer choosing aggressive maximums for automatic gain control.

Based on this, we recommend you check your low light bandwidth consumption. If it is quite high, see if a gain control cap exists and try lowering it from the manufacturer's default maximum.

The other option is to use MBR. The image below shows our test results of taking a scene with maximum gain and limiting its bandwidth to 1 Mb/s. The overall image quality is practically unchanged but at a fraction of the bandwidth.

bandwidth impact at max gain

Gain Impact Across Cameras

Finally, here is a summary comparison of gain across light levels, gain settings and cameras tested. Take a look and compare the differences yourself. Perhaps the most interesting element we saw here was that with bright light (300 lux at the bottom of the comparison), the Avigilon appears to provide the sharpest image details. However, with low gain, Avigilon's image essentially disappears.

impact of varying lux and gain across cameras

Digital Noise Reduction and Gain

IP cameras may employ a technology to reduce the noise generated by high gain values, known as Dynamic Noise Reduction (DNR).

DNR aims to reduce digital noise by processing individual frames (2 dimensional) or across a series of frames (3 dimensional) to identify scene changes in order to determine what is and is not noise. By reducing overall noise in the image, bandwidth requirements are also reduced, sometimes dramatically.

For example, taking a sample of cameras from in our bandwidth vs. low light and DNR tests, bitrates increased by nearly 15x from day to night without using DNR (an average of 10 Mb/s vs. ~0.9 Mb/s). Turning DNR on, these spikes dropped to ~3x (~3.24 vs. ~0.9 Mb/s), still substantial, but much improved versus not using DNR.

However, users should be careful not to apply too much digital noise reduction, as high levels can create blur on moving objects, similar in appearance to slow shutter.

For full details, see our Camera Digital Noise Reduction Guide and Testing Bandwidth vs. Low Light.

Quiz Yourself on AGC / Gain

Take the AGC / Gain quiz now.

11 reports cite this report:

Bandwidth vs Low Light Shootout - Avigilon, Axis, Bosch, Dahua, Geovision, Hanwha, Hikvision, Uniview, Vivotek on Feb 08, 2019
Nighttime bandwidth spikes are a major concern in video surveillance, but do...
Testing Bandwidth Vs. Low Light on Jan 16, 2019
Nighttime bandwidth spikes are a major concern in video surveillance. Many...
Smart Codec Guide on Feb 01, 2018
"Smart Codec" was once seemingly a marketing buzzword, but in 2021, nearly...
Super Low Light Surveillance Guide on Aug 01, 2017
Historically, low light performance of megapixel cameras was terrible, with...
The PPF / PPM Video Surveillance Guide on Dec 23, 2016
Pixels per foot / Pixels per meter is the most fundamental and valuable,...
Avigilon Real Time Exposure And Gain on Feb 24, 2015
Knowing how exposure and gain impact image quality, bandwidth, and camera...
Tested: Lowering Bandwidth at Night is Good on Dec 29, 2014
Bandwidth spikes in low light are commonplace, with increases of 300 to 500%...
Camera DNR (Digital Noise Reduction) Guide on Nov 20, 2014
Bandwidth spikes are a significant video problem. An IPVM study found 250 -...
Testing Smoked vs Clear Domes on Jun 19, 2014
The best way to conceal where a camera is pointed is to use a smoked dome....
IPVM Seminar Poll Results on Sep 24, 2011
At our first ever IPVM seminar, we held a number of real time polls asking...
The Truth About IR Lighting and Bandwidth on Aug 13, 2011
One of the industry's top growing myths is that IR illumination massively...
Comments (13) : Members only. Login. or Join.
Loading Related Reports