Template Class MedianFilter

Inheritance Relationships

Base Type

Class Documentation

template<typename T>
class MedianFilter : public filters::FilterBase<T>

A median filter which works on arrays.

Public Functions

MedianFilter()

Construct the filter with the expected width and height.

~MedianFilter() override

Destructor to clean up.

virtual bool configure() override

Pure virtual function for the sub class to configure the filter This function must be implemented in the derived class.

virtual bool update(const T &data_in, T &data_out) override

Update the filter and return the data seperately.

Parameters:
  • data_in – double array with length width

  • data_out – double array with length width

Protected Attributes

std::vector<T> temp_storage_

Preallocated storage for the list to sort.

std::unique_ptr<RealtimeCircularBuffer<T>> data_storage_

Storage for data between updates.

T temp
size_t number_of_observations_

Number of observations over which to filter.