![]() |
UtilsLite
Utilities for C++ programming
|
Class for performing Total Variation Denoising (TVD) on 1D signals. More...
#include <Utils_TVD.hh>
Static Public Member Functions | |
static void | denoise (Integer N, Real const y[], Real lambda, Real x[]) |
Denoises a 1D signal using total variation denoising. | |
static void | denoise (Integer N, Real const y[], Integer incy, Real lambda, Real x[], Integer incx) |
Performs total variation denoising on a 1D signal. | |
Class for performing Total Variation Denoising (TVD) on 1D signals.
The TVD
class implements algorithms for denoising signals by minimizing total variation. The primary method provided is denoise
, which applies total variation denoising to a given input signal.
This algorithm minimizes the objective function defined as:
\[ \textrm{minimize}\quad \sum_k (y_k - x_k)^2 + \lambda \sum_k |x_{k+1}-x_k| \]
where \( y_k \) is the input signal, \( x_k \) is the denoised signal, and \( \lambda \) is a regularization parameter that controls the trade-off between data fidelity and smoothness of the result.
| Laurent Condat. | A Direct Algorithm for 1D Total Variation Denoising. | IEEE Signal Processing Letters, | Institute of Electrical and Electronics Engineers, 2013, 20 (11), pp.1054-1057. | DOI: <10.1109/LSP.2013.2278339>. | Available at: https://hal.science/hal-00675043v4
Real | The data type used for the computation (e.g., float, double). |
|
static |
Performs total variation denoising on a 1D signal.
This method minimizes the objective function defined as:
\[ \textrm{minimize}\quad \sum_k (y_k - x_k)^2 + \lambda \sum_k |x_{k+1}-x_k| \]
where \( y_k \) is the input signal, \( x_k \) is the denoised signal, and \( \lambda \) is a regularization parameter that controls the trade-off between data fidelity and smoothness of the result.
N | The number of elements in the input signal. |
y | A pointer to the input signal array (size N). |
incy | The increment between consecutive elements in the input array (y). |
lambda | The regularization parameter that controls the smoothness. |
x | A pointer to the output denoised signal array (size N). |
incx | The increment between consecutive elements in the output array (x). |
|
inlinestatic |
Denoises a 1D signal using total variation denoising.
This method is a convenience wrapper that calls the more detailed denoise
method with a default increment of 1 for both the input and output arrays.
N | The number of elements in the input signal. |
y | A pointer to the input signal array (size N). |
lambda | The regularization parameter that controls the smoothness. |
x | A pointer to the output denoised signal array (size N). |