GestureRecognitionToolkit  Version: 0.2.0
The Gesture Recognition Toolkit (GRT) is a cross-platform, open-source, c++ machine learning library for real-time gesture recognition.
FFTFeatures.h
Go to the documentation of this file.
1 
29 #ifndef GRT_FFT_FEATURES_HEADER
30 #define GRT_FFT_FEATURES_HEADER
31 
32 #include "../../CoreModules/FeatureExtraction.h"
33 #include "FFT.h"
34 
35 GRT_BEGIN_NAMESPACE
36 
37 class GRT_API FFTFeatures : public FeatureExtraction
38 {
39 public:
52  FFTFeatures(UINT fftWindowSize=512,UINT numChannelsInFFTSignal=1,bool computeMaxFreqFeature = true,bool computeMaxFreqSpectrumRatio = true,bool computeCentroidFeature = true,bool computeTopNFreqFeatures = true,UINT N = 10);
53 
59  FFTFeatures(const FFTFeatures &rhs);
60 
64  virtual ~FFTFeatures(void);
65 
72  FFTFeatures& operator=(const FFTFeatures &rhs);
73 
82  virtual bool deepCopyFrom(const FeatureExtraction *featureExtraction);
83 
91  virtual bool computeFeatures(const VectorFloat &inputVector);
92 
100  virtual bool reset();
101 
108  virtual bool saveModelToFile( std::string filename ) const;
109 
116  virtual bool loadModelFromFile( std::string filename );
117 
125  virtual bool saveModelToFile( std::fstream &file ) const;
126 
134  virtual bool loadModelFromFile( std::fstream &file );
135 
150  bool init(UINT fftWindowSize,UINT numChannelsInFFTSignal,bool computeMaxFreqFeature,bool computeMaxFreqSpectrumRatio,bool computeCentroidFeature,bool computeTopNFreqFeatures,UINT N);
151 
152  //Tell the compiler we are using the following functions from the FeatureExtraction class to stop hidden virtual function warnings
153 
154 protected:
155  UINT fftWindowSize;
156  UINT numChannelsInFFTSignal;
157  bool computeMaxFreqFeature;
158  bool computeMaxFreqSpectrumRatio;
159  bool computeCentroidFeature;
160  bool computeTopNFreqFeatures;
161 
162  UINT N;
163  Float maxFreqFeature;
164  Float maxFreqSpectrumRatio;
165  Float centroidFeature;
166  VectorFloat topNFreqFeatures;
167 
169 
170 public:
171 };
172 
173 GRT_END_NAMESPACE
174 
175 #endif //GRT_FFT_FEATURES_HEADER
176 
virtual bool saveModelToFile(std::fstream &file) const
virtual bool loadModelFromFile(std::fstream &file)
virtual bool computeFeatures(const VectorFloat &inputVector)
virtual bool reset()
The FFT class computes the Fourier transform of an N dimensional signal using a Fast Fourier Transfor...
virtual bool deepCopyFrom(const FeatureExtraction *rhs)