28 #ifndef GRT_SAVITZKY_GOLAY_FILTER_HEADER 29 #define GRT_SAVITZKY_GOLAY_FILTER_HEADER 31 #include "../CoreModules/PreProcessing.h" 32 #include "../Util/LUDecomposition.h" 50 SavitzkyGolayFilter(
const UINT numLeftHandPoints=10,
const UINT numRightHandPoints=10,
const UINT derivativeOrder=0,
const UINT smoothingPolynomialOrder=2,
const UINT numDimensions = 1);
108 virtual bool save(std::fstream &file)
const;
117 virtual bool load(std::fstream &file);
125 bool init(
const UINT numLeftHandPoints,
const UINT numRightHandPoints,
const UINT derivativeOrder,
const UINT smoothingPolynomialOrder,
const UINT numDimensions);
133 Float filter(
const Float x);
155 static std::string
getId();
162 inline int min_(
int a,
int b) {
return b < a ? (b) : (a);}
163 inline Float min_(Float a,Float b) {
return b < a ? (b) : (a);}
167 UINT numLeftHandPoints;
168 UINT numRightHandPoints;
169 UINT derivativeOrder;
170 UINT smoothingPolynomialOrder;
176 static const std::string id;
183 #endif //GRT_SAVITZKY_GOLAY_FILTER_HEADER std::string getId() const
virtual bool deepCopyFrom(const PreProcessing *rhs)
virtual bool save(const std::string &filename) const
virtual bool reset() override
This implements a Savitzky-Golay filter. This code is based on the Savitzky Golay filter code from Nu...
virtual bool process(const VectorFloat &inputVector)
virtual bool load(const std::string &filename)