template<size_t N, typename Tval = double>
class eeros::control::MedianFilter< N, Tval >
A median filter (MedianFilter) block is used to filter an input signal. The output signal value depends on the current and various past input signal values. The median filter algorithm sorts all values. The median value will be set as output signal value if the MedianFilter instance is enabled.
MedianFilter is a class template with one type and one non-type template argument. The type template argument specifies the type which is used for the values when the class template is instantiated. The non-type template argument specifies the number of stored values.
If the MedianFilter is used with matrices (Matrix, Vector), the filter algorithm will consider all values in the matrice and will not separate them. For example a 3-tuple of a Vector3 instance will be kept together during processing in the MedianFilter.
If the sort algorithm can not sort the values, they will be left unchanged.
- Template Parameters
-
N | - number of considered values |
Tval | - value type (double - default type) |
- Since
- v0.6
template<size_t N, typename Tval = double>
Runs the filter algorithm.
Performs the calculation of the filtered output signal value.
Sorts the current and various past input signal values. The median value will be set as output signal value if the MedianFilter instance is enabled. Otherwise, the output signal value is set to the actual input signal value.
The timestamp value will not be altered.
- See also
- enable()
-
disable()
Implements eeros::Runnable.