|
| OneEuroFilter (float freq=DEFAULT_FREQUENCY, float mincutoff=DEFAULT_MINCUTOFF, float beta_=DEFAULT_BETA, float dcutoff=DEFAULT_DCUTOFF) |
|
void | begin (float freq, float mincutoff=1.0, float beta_=0.0, float dcutoff=1.0) |
| Creates the filter and set its parameters.
|
|
void | setFrequency (float f) |
| Sets the frequency of the signal.
|
|
void | setMinCutoff (float mc) |
| Sets the filter min cutoff frequency.
|
|
void | setBeta (float b) |
| Sets the Beta parameter.
|
|
float | filter (float value, TimeStamp timestamp=UndefinedTime) |
| Filter the noisy signal.
|
|
◆ begin()
void OneEuroFilter::begin |
( |
float |
freq, |
|
|
float |
mincutoff = 1.0 , |
|
|
float |
beta_ = 0.0 , |
|
|
float |
dcutoff = 1.0 |
|
) |
| |
Creates the filter and set its parameters.
- Parameters
-
freq | An estimate of the frequency in Hz of the signal (> 0), if timestamps are not available. |
mincutoff | Min cutoff frequency in Hz (> 0). Lower values allow to remove more jitter. |
beta_ | Parameter to reduce latency (> 0). |
dcutoff | Used to filter the derivates. 1 Hz by default. Change this parameter if you know what you are doing. |
◆ filter()
float OneEuroFilter::filter |
( |
float |
value, |
|
|
TimeStamp |
timestamp = UndefinedTime |
|
) |
| |
Filter the noisy signal.
- Parameters
-
value | Noisy value to filter |
timestamp | (optional) timestamp in seconds |
- Returns
- The filtered value
◆ setBeta()
void OneEuroFilter::setBeta |
( |
float |
b | ) |
|
Sets the Beta parameter.
- Parameters
-
b | Parameter to reduce latency (> 0). |
◆ setFrequency()
void OneEuroFilter::setFrequency |
( |
float |
f | ) |
|
Sets the frequency of the signal.
- Parameters
-
f | An estimate of the frequency in Hz of the signal (> 0), if timestamps are not available. |
◆ setMinCutoff()
void OneEuroFilter::setMinCutoff |
( |
float |
mc | ) |
|
Sets the filter min cutoff frequency.
- Parameters
-
mc | Min cutoff frequency in Hz (> 0). Lower values allow to remove more jitter. |
The documentation for this class was generated from the following file: