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);
108 virtual bool save(std::fstream &file)
const;
117 virtual bool load(std::fstream &file);
125 bool init(UINT numLeftHandPoints,UINT numRightHandPoints,UINT derivativeOrder,UINT smoothingPolynomialOrder,UINT numDimensions);
133 Float filter(
const Float x);
155 inline int min_(
int a,
int b) {
return b < a ? (b) : (a);}
156 inline Float min_(Float a,Float b) {
return b < a ? (b) : (a);}
160 UINT numLeftHandPoints;
161 UINT numRightHandPoints;
162 UINT derivativeOrder;
163 UINT smoothingPolynomialOrder;
174 #endif //GRT_SAVITZKY_GOLAY_FILTER_HEADER
virtual bool deepCopyFrom(const PreProcessing *rhs)
VectorFloat getFilteredData() const
virtual bool save(const std::string filename) const
virtual bool load(const std::string filename)
virtual bool process(const VectorFloat &inputVector)