Performs temporal noise reduction in a sequence of images. More...
Data Structures | |
struct | VPITNRParams |
Structure that defines the parameters for vpiSubmitTemporalNoiseReduction. More... | |
Enumerations | |
enum | VPITNRPreset |
Defines scene presets for temporal noise reduction. More... | |
enum | VPITNRVersion |
Defines the version of the Temporal Noise Reduction algorithm to be used. More... | |
Functions | |
VPIStatus | vpiCreateTemporalNoiseReduction (uint64_t backends, int32_t width, int32_t height, VPIImageFormat imgFormat, VPITNRVersion version, VPIPayload *payload) |
Creates a payload for Temporal Noise Reduction algorithm. More... | |
VPIStatus | vpiInitTemporalNoiseReductionParams (VPITNRParams *params) |
Initializes vpiSubmitTemporalNoiseReduction with default values. More... | |
VPIStatus | vpiSubmitTemporalNoiseReduction (VPIStream stream, uint64_t backend, VPIPayload payload, VPIImage prevFrame, VPIImage curFrame, VPIImage outFrame, const VPITNRParams *params) |
Submits a Temporal Noise Reduction operation to the stream. More... | |
Performs temporal noise reduction in a sequence of images.
Refer to Temporal Noise Reduction for more details and usage examples.
struct VPITNRParams |
Structure that defines the parameters for vpiSubmitTemporalNoiseReduction.
Definition at line 166 of file TemporalNoiseReduction.h.
Data Fields | ||
---|---|---|
VPITNRPreset | preset | Scene preset to be used. |
float | strength |
Noise reduction strength.
|
enum VPITNRPreset |
#include <vpi/algo/TemporalNoiseReduction.h>
Defines scene presets for temporal noise reduction.
These presets are used by Temporal Noise Reduction to define its internal parameters suitable for noise reduction of scenes captured with given characteristics.
Definition at line 83 of file TemporalNoiseReduction.h.
enum VPITNRVersion |
#include <vpi/algo/TemporalNoiseReduction.h>
Defines the version of the Temporal Noise Reduction algorithm to be used.
Higher version numbers usually achieve better quality.
Definition at line 97 of file TemporalNoiseReduction.h.
VPIStatus vpiCreateTemporalNoiseReduction | ( | uint64_t | backends, |
int32_t | width, | ||
int32_t | height, | ||
VPIImageFormat | imgFormat, | ||
VPITNRVersion | version, | ||
VPIPayload * | payload | ||
) |
#include <vpi/algo/TemporalNoiseReduction.h>
Creates a payload for Temporal Noise Reduction algorithm.
This function allocates all resources needed by the algorithm and ties the returned payload to the given backend.
[in] | backends | VPI backends that are eligible to execute the algorithm.
| |||||||||||||||||||||
[in] | width,height | Dimensions of frames to be processed.
| |||||||||||||||||||||
[in] | imgFormat | Format of the images to be processed.
| |||||||||||||||||||||
[in] | version | Version of the algorithm to be used. | |||||||||||||||||||||
[out] | payload | Pointer to the payload variable that receives the created handle. |
VPI_IMAGE_FORMAT_INVALID | imgFormat is not supported. |
VPI_ERROR_INVALID_ARGUMENT | payload is NULL. |
VPI_ERROR_INVALID_ARGUMENT | width or height outside valid range. |
VPI_ERROR_INVALID_ARGUMENT | Invalid TNR version . |
VPI_ERROR_INVALID_ARGUMENT | backends refers to an invalid backend. |
VPI_ERROR_INVALID_OPERATION | No VIC support is available. |
VPI_ERROR_INVALID_OPERATION | Backend isn't enabled in current context. |
VPI_ERROR_NOT_IMPLEMENTED | Temporal Noise Reduction algorithm version is not supported by given backend. |
VPI_ERROR_NOT_IMPLEMENTED | VIC Hardware with TNRv3 support is not available. |
VPI_ERROR_INVALID_CONTEXT | Current context is destroyed. |
VPI_ERROR_OUT_OF_MEMORY | Cannot allocate required resources. |
VPI_SUCCESS | Operation executed successfully. |
VPIStatus vpiInitTemporalNoiseReductionParams | ( | VPITNRParams * | params | ) |
#include <vpi/algo/TemporalNoiseReduction.h>
Initializes vpiSubmitTemporalNoiseReduction with default values.
Defaults:
[in] | params | Structure to be filled with default values. |
VPI_ERROR_INVALID_ARGUMENT | params is NULL. |
VPI_SUCCESS | Operation executed successfully. |
VPIStatus vpiSubmitTemporalNoiseReduction | ( | VPIStream | stream, |
uint64_t | backend, | ||
VPIPayload | payload, | ||
VPIImage | prevFrame, | ||
VPIImage | curFrame, | ||
VPIImage | outFrame, | ||
const VPITNRParams * | params | ||
) |
#include <vpi/algo/TemporalNoiseReduction.h>
Submits a Temporal Noise Reduction operation to the stream.
[in] | stream | The stream where the operation will be queued in.
|
[in] | backend | Backend that will execute the algorithm.
|
[in] | payload | Payload to be submitted along the other parameters. |
[in] | prevFrame | Result of the previous iteration. If the frame passed isn't the result image of the previous iteration, TNR will consider it to be NULL, i.e, the internal state will be reset and curFrame will be considered to be the first frame of a new sequence to be denoised.
|
[in] | curFrame | Current (noisy) frame to be processed.
|
[out] | outFrame | Output frame, where de-noised image will be written to.
|
[in] | params | Control parameters for temporal noise reduction If NULL, it'll use the defaults given by vpiInitTemporalNoiseReductionParams. |
VPI_ERROR_INVALID_ARGUMENT | stream is NULL. |
VPI_ERROR_INVALID_ARGUMENT | curFrame or outFrame are NULL. |
VPI_ERROR_INVALID_ARGUMENT | payload is not generated using vpiCreateTemporalNoiseReduction family of functions. |
VPI_ERROR_INVALID_ARGUMENT | prevFrame , curFrame and outFrame must have the same format and size configured during payload creation. |
VPI_ERROR_INVALID_ARGUMENT | Strength in params outside valid range. |
VPI_ERROR_INVALID_PAYLOAD_TYPE | payload is invalid. |
VPI_ERROR_INVALID_OPERATION | The needed backends aren't enabled in stream , prevFrame , curFrame or outFrame . |
VPI_SUCCESS | Operation executed successfully. |