Improving the image quality and noise reduction of BVS CA industrial cameras through temporary averaging
1. Introduction
The following document describes how you can use the denoising feature (averaging) of the BVS CA-SF and BVS CA-GX families. To do this, you need at least firmware version 2.8.0 for the BVS CA-SF1 and at least version 2.14.2 for the BVS CA-SF2. In contrast to image processing algorithms such as low-pass or averaging filters, temporary denoising (averaging) improves the image quality without losing information in the image.
2. What does the feature do?
Let's assume that someone adds the content of two images. While the image brightness is doubled, the noise is not doubled because it is (usually) statistically distributed. Statistically speaking, the noise level will only increase by a factor of √2 as soon as two images are added together. If the image is divided by a factor of 2 to achieve the same brightness again, it can be said that the noise level has been reduced or the signal-to-noise level increased by 3 dB.
3. What happens when several images are added together?
The EMVA1288 defines a series of functions and measurement rules for
-
the dynamic range,
-
the signal-to-noise ratio and
-
the dark current.
The dynamic range, for example, results from the ratio between the maximum filling quantity with charge carriers (full well capacity) Nwell (or saturation capacity according to EMVA1288) and the lowest signal, the dark current ndark ( Ndark [Dark Current]) according to the following formula:
Formula 1: Max. DNR of a sensor
The signal-to-noise ratio results from the ratio between the maximum filling quantity with charge carriers (full well capacity) and the noise, which is a geometric sum of dark current and signal noise. According to physics, signals in nature are influenced by so-called shot noise (also known as Poisson's shot noise or Schottky noise). Shot noise is proportional to the average value of its own signal. In bright scenes, shot noise dominates by far, so that SNR can simply be determined as √recording capacity.
Formula 2: Simplified maximum SNR of a sensor
Adding images is like adding the recording capacity. This results in DNR and SNR:
Formula 3: Average DNR of a sensor
Formula4: SNR increase through denoising (averaging)
Both the dynamic range and the SNR are increased by √avg. This is 20*(log (√avg)) dB
Example: avg=16: DNR and SNR improve by a factor of 4.
That is 12.04 dB or a 2 bit higher dynamic range.
The BVS CA-SF1 series can average up to 16 images at full bit depth in the camera's memory. While the camera is performing the calculation and outputting the images, the new images from the sensor are being processed. The data flow of the averaged images is therefore not continuous.
The BVS CA-SF2 series can sum the images up to a certain limit depending on the image size and bit depth (e.g. BVS CA-SF2-0024Z: 56 images@8 bit or 37 images@12 bit). The image feed is continuous and no incoming image is discarded.
The screenshot above shows an image with a gain of 42 dB (using bit shifting) without averaging. The standard deviation of the temporal noise (pixel positions from one image to the next) of the entire image is 40.29 digits (16 bits).
The following screenshot shows the same scene with 32 averaged images: The noise has been significantly reduced and no details have been lost in the image. The image still has a gain of 42 dB! As a result, the standard deviation could be reduced by a factor of 5.6 =√avg.
EMVA1288 measurements with the BVS CA-SF1-0013ZG camera, which contains the e2v 76C560 CMOS sensor with 10-bit ADC, achieved the following test results according to EMVA1288:
Averaging mode |
16x |
4x |
off |
Frame rate [fps] |
3,7 |
15,1 |
60,5 |
SNR,max [dB] |
51,9 |
45,9 |
39,8 |
SNR,max [bit] |
8,6 |
7,6 |
6,6 |
Dark noise [DN] |
0,7 |
1,29 |
2,5 |
Dynamic range [dB] |
62,7 |
57,3 |
51,4 |
Dynamic range [bit] |
10,4 |
9,5 |
8,5 |
Both SNR and DNR were consistent with the theory presented.
4. So what is preferable for low-light applications?
Average images with short exposure time exp (generates Nexp photons) avg or take an image with exposure time avg*exp?
This can be answered with the formula for DNR: In darker scenes, the averaging adds photons at the beginning, while dark current is added by the square roots.
Formula5 : DNR increase by averaging
Formula6: DNR increase by increasing the exposure time
Capturing an image with a higher exposure time leads to a higher dynamic range, as the dark current only needs to be taken into account once.
While averaging works perfectly for static images, it is obvious that motion blur or blurred images occur in images with movement.
5. How can you get to grips with motion blur? - Through running average (adaptive noise reduction)!
The well-known principle of adaptive noise reduction is integrated in the FPGA of some CCD cameras of the type BVS CA-GX.
It is assumed that the deviation of the gray value is determined pixel by pixel via the input signal (signal in) versus the signal of the frame memory. The incoming signal and the averaged signal are added in an inversely proportional manner, represented by two potentiometers. (i.e. the more input signal, the less averaged signal).
This property is controlled by a "slope" parameter so that, for example, 10% difference in pixel value results in 95% input signal and 5% averaged signal. This parameter can be used to control noise reduction at the expense of motion artifacts. This approach is well suited to motion because it relies on the fact that the human eye reacts more sensitively to noise in moving image areas than in static image areas. And this is exactly what the camera does. Static image areas are denoised because the loop is more "closed". Moving parts in the image are less denoised as the loop is more "open" for these pixels.
The image frequency is not reduced by the denoising, nor is there a delay. The reason is simple: the image output is generated in the FPGA before the memory. However, the frame rate is reduced as it takes a few frames to denoise.
The following screenshots show that denoising is possible in images with static content and that low noise and motion blur are also possible in images with moving content.
Image with static content and high amplification (gain); without noise reduction
Same, denoised scene (Slope 1000)
Scene with moving tire
6.1. Exposure time vs. averaging / summation
What is the difference between an N times longer exposure time and N image averaging and N times gain of an image (if the current image is too dark)?
Both methods result in the same brightness level in the final image.
-
The first obvious difference is the frame rate. With averaging, the frame rate is reduced by the number of frames used in the averaging.
-
From an image quality perspective, we have already learned that the temporary noise is reduced by the square root of the number of frames averaged. This results in a signal-to-noise ratio that is approximately equivalent to N times exposure vs. N times averaging and N times gain. The main difference is that averaging is also applied to the readout noise of the sensor and is independent of the exposure time. This means that the sensitivity threshold is reduced in any case.
-> Averaging increases the sensitivity of the camera, while a longer exposure time leads to a higher dynamic range. For low-light applications, the latter is usually less important, whereas averaging is.
Image is N times too dark:
-
With an N times longer exposure this results in:
-
With N times gain and N times averaging, this results in:
6.2.1. SNR
Due to the Poisson distribution, the deviation corresponds to the mean value. If we assume that we only reach 1/𝑁 of the possible saturation levels𝑁𝑠𝑎𝑡, we can use N times exposure to obtain𝑁𝑠𝑎𝑡:
If images are added (the same applies to Averaging):
In this way, we get the same SNR value for N times exposure or N times averaging/summation
6.2.3. Sensitivity Threshold
The value remains constant with different exposure times, as there is no dependency on the exposure time. As soon as images are added, this results:
And consequently:
Simulation values:
Max Saturation |
10000 e- |
Read noise |
2 e- |
original |
Bright Noise: 27.95 e-, Dark Noise: 2.02 e-, SNR: 93.52 | 39.42 dB, DNR: 1294.49 | 62.24 dB |
4 x exposure |
Bright Noise: 58.26 e-, Dark Noise: 2.21 e-, SNR: 180.01 | 45.11 dB, DNR: 4742.76 | 73.52 dB |
4 x average |
Bright Noise: 13.96 e-, Dark Noise: 1.01 e-, SNR: 187.28 | 45.45 dB, DNR: 2588.27 | 68.26 dB |