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);
143 bool init(UINT numLeftHandPoints,UINT numRightHandPoints,UINT derivativeOrder,UINT smoothingPolynomialOrder,UINT numDimensions);
151 Float
filter(
const Float x);
169 inline int min_(
int a,
int b) {
return b < a ? (b) : (a);}
170 inline Float min_(Float a,Float b) {
return b < a ? (b) : (a);}
174 UINT numLeftHandPoints;
175 UINT numRightHandPoints;
176 UINT derivativeOrder;
177 UINT smoothingPolynomialOrder;
188 #endif //GRT_SAVITZKY_GOLAY_FILTER_HEADER
virtual bool loadModelFromFile(std::string filename)
Float filter(const Float x)
virtual ~SavitzkyGolayFilter()
virtual bool saveModelToFile(std::string filename) const
VectorFloat getFilteredData() const
SavitzkyGolayFilter(UINT numLeftHandPoints=10, UINT numRightHandPoints=10, UINT derivativeOrder=0, UINT smoothingPolynomialOrder=2, UINT numDimensions=1)
virtual bool deepCopyFrom(const PreProcessing *preProcessing)
SavitzkyGolayFilter & operator=(const SavitzkyGolayFilter &rhs)
virtual bool process(const VectorFloat &inputVector)