31 #ifndef GRT_SAVITZKY_GOLAY_FILTER_HEADER
32 #define GRT_SAVITZKY_GOLAY_FILTER_HEADER
34 #include "../CoreModules/PreProcessing.h"
35 #include "../Util/LUDecomposition.h"
50 SavitzkyGolayFilter(UINT numLeftHandPoints=10,UINT numRightHandPoints=10,UINT derivativeOrder=0,UINT smoothingPolynomialOrder=2,UINT numDimensions = 1);
90 virtual bool process(
const VectorDouble &inputVector);
143 bool init(UINT numLeftHandPoints,UINT numRightHandPoints,UINT derivativeOrder,UINT smoothingPolynomialOrder,UINT numDimensions);
151 double filter(
const double x);
159 VectorDouble
filter(
const VectorDouble &x);
169 inline int min_(
int a,
int b) {
return b < a ? (b) : (a);}
170 inline double min_(
double a,
double b) {
return b < a ? (b) : (a);}
174 UINT numLeftHandPoints;
175 UINT numRightHandPoints;
176 UINT derivativeOrder;
177 UINT smoothingPolynomialOrder;
182 static RegisterPreProcessingModule< SavitzkyGolayFilter > registerModule;
188 #endif //GRT_SAVITZKY_GOLAY_FILTER_HEADER
SavitzkyGolayFilter(UINT numLeftHandPoints=10, UINT numRightHandPoints=10, UINT derivativeOrder=0, UINT smoothingPolynomialOrder=2, UINT numDimensions=1)
virtual ~SavitzkyGolayFilter()
SavitzkyGolayFilter & operator=(const SavitzkyGolayFilter &rhs)
VectorDouble getFilteredData() const
virtual bool deepCopyFrom(const PreProcessing *preProcessing)
virtual bool saveModelToFile(string filename) const
virtual bool loadModelFromFile(string filename)
virtual bool process(const VectorDouble &inputVector)
double filter(const double x)