Testing: Gain / AGC Impact on Surveillance Videoby John Honovich, IPVM posted on Jul 10, 2011 About John Contact John
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?
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 in film shooting, 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 unlike 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 CBR or VBR with a Cap: Since bandwidth is nearly guaranteed to spike as gain increases, consider using CBR or VBR with a bandwidth cap to minimize the negative side effects of gain control.
Below is a video that shows and explains our key findings with references to our test video and images:
Configuring and Optimizing Gain
Gain is generally controlled by two modes:
- Levels: For example, high, medium, low - this is a coarse grained control.
- dBs: For example, 0dB, 15dB, 30dB, etc. A fine gain control, the range tends to be from 0dB (off) to 30dB (very aggressive).
In addition to these modes, two options are sometimes available:
- Fixed: By default, most cameras automatically determine what level gain should be. 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 imager 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:
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.
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 CBR streaming or VBR with a cap of maximum bandwidth. 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.
Gain's 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.
Most Recent Industry Reports
30 vs 60 FPS Shootout on May 22, 2013
30 frames per second used to be the maximum practical limit for surveillance cameras. Now, it is becoming increasingly common for IP cameras to support double that, 60 frames per second. (For backg...
#1 IP Camera Benefit on May 20, 2013
Megapixel was, far and away, the number #1 cited benefit in going to IP cameras / video. We asked over 100 integrators to name the "3 biggest reasons" they found, allowing them to name whatever the...
Testing VSaaS / Dropcam HD on May 15, 2013
Dropcam is pretty clearly the strongest upstart in the VSaaS market. While Axis has pushed their hosted service offering for years, it is beset by poor ROI and weak performance. There are dozens of...
Testing Panoramic Cameras Outdoors on May 13, 2013
Outdoors, PTZs tend to be a favorite for covering large open areas but they only see whatever they are currently pointed at. Panoramics are an emerging alternative but how well do they perform and ...
Testing CarCam on May 08, 2013
Dash cams are getting a lot of attention for the amazing video they inadvertently capture, like a crashing 747 in Afghanistan, a meteor explosion, Russian crazy fights and accidents, etc. Moreov...
#1 IP Camera Problem on May 07, 2013
Cost was, far and away, the number #1 cited problem in going to IP cameras / video. We asked over 100 integrators to name the "3 biggest problems / barriers" they found, allowing them to name whate...
Testing Covert Cameras on May 02, 2013
Covert cameras are regularly referenced in TV shows and undercover reporting. We ordered two of the most frequently sold covert cameras on Amazon - a Car Key cam and a PenCam, as shown below: We...
Stop The Lying and Crazy Claims on Apr 29, 2013
The last few weeks have been an embarrassment for surveillance, with a small number of companies turning this into a despicable marketing campaign perpetuating lies and crazy myths about what surve...
Panoramic Camera Shootout on Apr 22, 2013
Panoramic cameras are one of the hottest growing markets within surveillance. The combination of multi-megapixel resolution and super wide FoVs claims to deliver greater coverage than conventional ...
Top Trends in Access Control on Apr 17, 2013
All of a sudden, Access Control has momentum? After a long period of apparent stagnation and staleness, new technologies and devoted marketing campaigns have breathed life into the segment. Indeed,...