Template Class MeanFilter

Inheritance Relationships

Base Type

Class Documentation

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

A mean filter which works on doubles.

Public Functions

MeanFilter()

Construct the filter with the expected width and height.

~MeanFilter() 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 – T array with length width

  • data_out – T array with length width

Protected Attributes

std::unique_ptr<RealtimeCircularBuffer<T>> data_storage_

Storage for data between updates.

uint32_t last_updated_row_

The last row to have been updated by the filter.

T temp_
uint32_t number_of_observations_

Number of observations over which to filter.