30 #ifndef FILTERS_MEDIAN_H 31 #define FILTERS_MEDIAN_H 37 #include <boost/scoped_ptr.hpp> 49 #define ELEM_SWAP(a,b) { register elem_type t=(a);(a)=(b);(b)=t; } 66 template <
typename elem_type>
69 register int i,j,l,m ;
70 register elem_type x ;
89 #define median(a,n) kth_smallest(a,n,(((n)&1)?((n)/2):(((n)/2)-1))) 113 virtual bool update(
const T& data_in, T& data_out);
126 template <
typename T>
133 template <
typename T>
139 template <
typename T>
145 fprintf(stderr,
"Error: MedianFilter was not given params.\n");
156 template <
typename T>
168 for (uint32_t row = 0; row < length; row ++)
180 template <
typename T>
197 virtual bool update(
const std::vector<T>& data_in, std::vector<T>& data_out);
210 template <
typename T>
217 template <
typename T>
223 template <
typename T>
229 fprintf(stderr,
"Error: MultiChannelMedianFilter was not given params.\n");
241 template <
typename T>
258 for (uint32_t row = 0; row < length; row ++)
270 #endif// FILTERS_MEDIAN_H
A Base filter class to provide a standard interface for all filters.
A realtime safe circular (ring) buffer.
unsigned int number_of_channels_
How many parallel inputs for which the filter is to be configured.
elem_type kth_smallest(elem_type a[], int n, int k)