Adaptive speed-based low-pass filter (the 1-euro filter) for smoothing noisy pointer signals such as the Wii U IR pointer.
More...
#include <OneEuroFilter.h>
|
| | OneEuroFilter (float minCutoff=1.0f, float beta=0.0f, float dCutoff=1.0f) |
| |
| float | filter (float value, float dt) |
| |
| void | reset () |
| | Forgets all history; the next filter() call returns its input unchanged.
|
| |
| void | setParams (float newMinCutoff, float newBeta, float newDCutoff=1.0f) |
| | Changes the filter parameters without resetting its state; see the constructor for their meaning.
|
| |
Adaptive speed-based low-pass filter (the 1-euro filter) for smoothing noisy pointer signals such as the Wii U IR pointer.
Definition at line 65 of file OneEuroFilter.h.
◆ OneEuroFilter()
| OneEuroFilter::OneEuroFilter |
( |
float | minCutoff = 1.0f, |
|
|
float | beta = 0.0f, |
|
|
float | dCutoff = 1.0f ) |
|
inline |
- Parameters
-
| minCutoff | Cutoff frequency in Hz when the signal is at rest (lower = smoother, more lag) |
| beta | How much the cutoff rises with signal speed (higher = snappier during fast motion) |
| dCutoff | Cutoff frequency in Hz for the speed estimate; rarely needs changing |
Definition at line 70 of file OneEuroFilter.h.
◆ filter()
| float OneEuroFilter::filter |
( |
float | value, |
|
|
float | dt ) |
|
inline |
- Parameters
-
| value | Raw noisy sample |
| dt | Seconds since the previous call (must be > 0; non-positive values are treated as 1/60 s) |
- Returns
- the filtered value
Definition at line 76 of file OneEuroFilter.h.
◆ reset()
| void OneEuroFilter::reset |
( |
| ) |
|
|
inline |
◆ setParams()
| void OneEuroFilter::setParams |
( |
float | newMinCutoff, |
|
|
float | newBeta, |
|
|
float | newDCutoff = 1.0f ) |
|
inline |
Changes the filter parameters without resetting its state; see the constructor for their meaning.
Definition at line 106 of file OneEuroFilter.h.
The documentation for this class was generated from the following file: