A Gaussian filter.
More...
#include <smoother.hpp>
|
virtual | ~smootherGMWF () |
|
bool | setup (const real_t sg, const real_t c, real_t *window, real_t *kernel, const size_t wk_size) |
| Setup an initialize the Gaussian filter.
|
|
template<size_t windowAndKernelSize> |
bool | setup (const real_t sg, const real_t c, real_t(&window)[windowAndKernelSize], real_t(&kernel)[windowAndKernelSize]) |
| Setup an initialize the Gaussian filter.
|
|
real_t | smooth (const real_t x) override |
| Perform the smooth operation recursively for the input signal x.
|
|
virtual | ~smoother () |
|
bool | isInitialized (void) const |
| Check if the smoother filter is initialized.
|
|
bool | reset (void) |
| Reset the the smoother filter.
|
|
◆ ~smootherGMWF()
virtual qlibs::smootherGMWF::~smootherGMWF |
( |
| ) |
|
|
inlinevirtual |
◆ setup() [1/2]
Setup an initialize the Gaussian filter.
- Parameters
-
[in] | sg | Standard deviation [ sigma > 0 ] |
[in] | c | Offset of the gaussian center [ 0 < offset < ( wsize - 1 ) ] |
[in] | window | An array to hold the samples of the window |
[in] | kernel | An array to hold the gaussian kernel coefficients. |
[in] | wk_size | The number of elements in window or kernel. |
- Note
- Size of both window and kernel should be equal
- Returns
true
on success, otherwise return false
.
◆ setup() [2/2]
template<size_t windowAndKernelSize>
bool qlibs::smootherGMWF::setup |
( |
const real_t | sg, |
|
|
const real_t | c, |
|
|
real_t(&) | window[windowAndKernelSize], |
|
|
real_t(&) | kernel[windowAndKernelSize] ) |
|
inline |
Setup an initialize the Gaussian filter.
- Parameters
-
[in] | sg | Standard deviation [ sigma > 0 ] |
[in] | c | Offset of the gaussian center [ 0 < offset < ( wsize - 1 ) ] |
[in] | window | An array to hold the samples of the window |
[in] | kernel | An array to hold the gaussian kernel coefficients. |
- Note
- Size of both window and kernel should be equal
- Returns
true
on success, otherwise return false
.
◆ smooth()
Perform the smooth operation recursively for the input signal x.
- Precondition
- Instance must be previously initialized
- Parameters
-
[in] | x | A sample of the input signal. |
- Returns
- The smoothed output.
Implements qlibs::smoother.