00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef ODFCOG_H
00020 #define ODFCOG_H
00021
00022 #include "Typedefs.h"
00023 #include "Debug.h"
00024
00025 #include "SpectralODFBase.h"
00026 #include "PeakDetection.h"
00027 #include "PeakCOG.h"
00028
00029 class SpectralODFCOG : public SpectralODFBase {
00030 protected:
00031
00032 int _fftSize;
00033 int _peakCount;
00034 int _bandwidth;
00035
00036
00037 MatrixXR _spectrumAbs2;
00038 MatrixXR _spectrumArg;
00039 MatrixXR _spectrumArgDeriv;
00040
00041 MatrixXR _peakPos;
00042 MatrixXR _peakMag;
00043
00044 MatrixXR _cog;
00045
00046 PeakDetection _peaker;
00047 PeakCOG _peakCoger;
00048
00049 public:
00050 SpectralODFCOG(int fftSize, int bandwidth = 6, int peakCount = 40);
00051
00052 ~SpectralODFCOG();
00053
00054 void setup();
00055
00056 void process(const MatrixXC& fft, MatrixXR* odfValue);
00057
00058 void reset();
00059
00060 };
00061
00062 #endif