![]() |
My Project
|
FilterMedian provides an median filter More...
#include <Filter.h>
Public Member Functions | |
| FilterMedian (int size=3) | |
| void | setWindowSize (int size) |
| double | operator= (double _value) |
| virtual double | next (double y) |
| Update the value. All inherited classes need to update value in next(). | |
Public Member Functions inherited from FilterAverage | |
| FilterAverage (int size=3) | |
| void | setWindowSize (int size) |
| int | getWindowSize () |
| int | getCurrentSize () |
| double | operator= (double _value) |
| virtual void | reset () |
| Reset the filter state. | |
| double | deviation () const |
Public Member Functions inherited from Filter | |
| Filter () | |
| Constructor. | |
| double | get () const |
| Get the latest value. | |
| operator double () | |
| Get the latest value. | |
Additional Inherited Members | |
Protected Member Functions inherited from FilterAverage | |
| void | push_to_buffer (double y) |
Protected Attributes inherited from FilterAverage | |
| unsigned int | count |
| unsigned int | window_size |
| std::deque< double > | buffer |
Protected Attributes inherited from Filter | |
| double | value |
FilterMedian provides an median filter
The FilterMedian remembers window_size last elements in the time series and returns always the middle element after sorting ((window_size / 2) + 1) elements. The size of the window window_size can be set in the constructor or with setWindowSize() .