Mercurial > hg > qm-dsp
diff dsp/segmentation/ClusterMeltSegmenter.h @ 20:8bdbda7fb893
* First cut at properly integrating the segmenter and making it work right
author | cannam |
---|---|
date | Wed, 09 Jan 2008 16:50:04 +0000 |
parents | 8e90a56b4b5f |
children | 2b74bd60c61f |
line wrap: on
line diff
--- a/dsp/segmentation/ClusterMeltSegmenter.h Wed Jan 09 10:48:08 2008 +0000 +++ b/dsp/segmentation/ClusterMeltSegmenter.h Wed Jan 09 16:50:04 2008 +0000 @@ -11,8 +11,9 @@ #include "segment.h" #include "Segmenter.h" -#include "hmm.h" -#include "lib_constQ.h" +#include "hmm/hmm.h" +#include "base/Window.h" +#include "dsp/chromagram/ConstantQ.h" using std::vector; @@ -40,8 +41,8 @@ ClusterMeltSegmenter(ClusterMeltSegmenterParams params); virtual ~ClusterMeltSegmenter(); virtual void initialise(int samplerate); - virtual int getWindowsize() { return static_cast<int>(windowSize * samplerate); } - virtual int getHopsize() { return static_cast<int>(hopSize * samplerate); } + virtual int getWindowsize(); + virtual int getHopsize(); virtual void extractFeatures(double* samples, int nsamples); void setFeatures(const vector<vector<double> >& f); // provide the features yourself virtual void segment(); // segment into default number of segment-types @@ -51,9 +52,9 @@ //void mpeg7ConstQ(); void makeSegmentation(int* q, int len); - double* window; - int windowLength; // in samples - constQ_t* constq; + Window<double> *window; +// int windowLength; // in samples + ConstantQ* constq; model_t* model; // the HMM //vector<int> stateSequence; //vector<int> segmentTypeSequence;