Median filter manager.
More...
|
| | MedianFilter (void) |
| | Default constructor.
|
| |
| void | begin (const int16_t seed) |
| | Initializes this instance.
|
| |
| int16_t | in (const int16_t value) |
| | Insert a value in the filter.
|
| |
| int16_t | out (void) const |
| | Gets the median values.
|
| |
Median filter manager.
It uses a buffer to store data and compute the median value.
◆ MedianFilter()
| MedianFilter::MedianFilter |
( |
void | | ) |
|
|
inline |
Default constructor.
Creates and instance of this class.
◆ begin()
| void MedianFilter::begin |
( |
const int16_t | seed | ) |
|
|
inline |
Initializes this instance.
- Parameters
-
| [in] | seed | Buffer start value. |
◆ in()
| int16_t MedianFilter::in |
( |
const int16_t | value | ) |
|
|
inline |
Insert a value in the filter.
Insert the given value in the filter and than computes the median among inserted values.
- Parameters
-
| [in] | value | The value to be inserted. |
- Returns
- The median element.
◆ out()
| int16_t MedianFilter::out |
( |
void | | ) |
const |
|
inline |
Gets the median values.
Accesses the buffer position where the median value is stored in O(1).
- Returns
- The median.
◆ data
Array of data ordered by age (Circular buffer).
◆ locationMap
Array used to store data locations in the map.
◆ medDataPointer
| byte MedianFilter::medDataPointer |
|
private |
Central point of the filter sliding window.
◆ medFilterWin
| byte MedianFilter::medFilterWin |
|
private |
Samples number in the sliding window of the filter - usually an odd value.
◆ oldestDataPoint
| byte MedianFilter::oldestDataPoint |
|
private |
Position of the oldest value in the circular buffer.
◆ sizeMap
Array used to store data locations ordered by size.
The documentation for this class was generated from the following file: