This algorithm is used to reduce both spatial and temporal noise in video sequences. Noise levels can vary significantly depending on lighting conditions, camera sensor sensibility and quality, etc. VPI's temporal noise reduction is more suited to handle thermal and shot noise, which follow gaussian and poisson distributions respectively.
There are currently 3 versions of the algorithm, with varying degrees of speed, configurability and quality. Not all always available in a given backend and platform combination.
Noise reduction factor can be customized by means of two parameters: scene lighting condition and strength (a value between 0 and 1). Setting it to low light scenes results in increased reduction strength, but might result in loss of detail in highly textured regions or even some ghosting effect. Using bright light mode does the opposite: less ghosting and mode details preserved, but reduced noise reduction factor.
The example below shows the temporal noise reduction in action. Hover the mouse pointer over the video and click the maximize button to see more details.
Noisy input | Parameters | De-noised output |
---|---|---|
scene: outdoor medium light strength: 1.0 version: 3 |
Depending on the chosen algorithm version, the algorithm employs different techniques such as bilateral filtering for handling spatial noise and/or a temporal IIR filter associated with a motion detector.
There are 3 versions of the algorithm, each one with different speed/configurability/quality trade-offs:
Availability of each level depends on backend and device, see Limitations and Constraints for more information. To pick the best available version, just use VPI_TNR_DEFAULT when specifying algorithm version.
Versions 2 and 3 allow the user to specify of scene's lighting condition, which in turn controls the noise reduction strength for a particular scene. Higher strength will lead to less noise, but sometimes loss of detail in highly textured regions and some ghosting, especially around fast moving objects. If input noise is high, due to poor lighting and/or higher sensor sensibility, this might be a suitable trade-off.
The following scene presets are available:
For each preset, user can define a strength factor, basically a floating point number from 0 (least amount of noise reduction) and 1 (maximum amount). 0.5 is a good default to be picked in most cases.
input
. prevFrame
must be NULL, or else the output of previous iteration must be passed. output
and prevOutput
. In next iteration, output
will be input as prevOutput
, and current prevOutput
buffer will receive the next de-noised frame. Consult the Temporal Noise Reduction sample application for a complete example.For more details, consult the API reference.
Constraints for specific backends supersede the ones specified for all backends.
The following algorithm versions are available:
The following algorithm versions are available:
For further information on how performance was benchmarked, see Performance Measurement.
size | type | version | CPU | CUDA | PVA |
---|---|---|---|---|---|
1920x1080 | nv12 | 1 | n/a | n/a | 1.871 ms |
1920x1080 | nv12 | 2 | n/a | n/a | 1.864 ms |
1920x1080 | nv12 | 3 | n/a | 1.3552 ms | 2.206 ms |
size | type | version | CPU | CUDA | PVA |
---|---|---|---|---|---|
1920x1080 | nv12 | 1 | n/a | n/a | 2.426 ms |
1920x1080 | nv12 | 2 | n/a | n/a | 2.420 ms |
1920x1080 | nv12 | 3 | n/a | 4.96 ms | n/a |
size | type | version | CPU | CUDA | PVA |
---|---|---|---|---|---|
1920x1080 | nv12 | 1 | n/a | n/a | 2.339 ms |
1920x1080 | nv12 | 2 | n/a | n/a | 2.331 ms |
1920x1080 | nv12 | 3 | n/a | 12.84 ms | n/a |