comparison src/Matcher.cpp @ 104:6636aca831c0 feature_conditioner

Feature size is not actually needed in Matcher
author Chris Cannam
date Thu, 04 Dec 2014 13:23:10 +0000
parents 6b91e40b2c04
children 42381e437fcd
comparison
equal deleted inserted replaced
103:593054bf6476 104:6636aca831c0
23 23
24 using namespace std; 24 using namespace std;
25 25
26 //#define DEBUG_MATCHER 1 26 //#define DEBUG_MATCHER 1
27 27
28 Matcher::Matcher(Parameters parameters, Matcher *p, int m_featureSize_) : 28 Matcher::Matcher(Parameters parameters, Matcher *p) :
29 m_params(parameters), 29 m_params(parameters),
30 m_featureSize(m_featureSize_),
31 m_metric(parameters.distanceNorm) 30 m_metric(parameters.distanceNorm)
32 { 31 {
33 #ifdef DEBUG_MATCHER 32 #ifdef DEBUG_MATCHER
34 cerr << "Matcher::Matcher(" << m_params.sampleRate << ", " << p << ", " << m_featureSize << ")" << endl; 33 cerr << "Matcher::Matcher(" << m_params.sampleRate << ", " << p << ")" << endl;
35 #endif 34 #endif
36 35
37 m_otherMatcher = p; // the first matcher will need this to be set later 36 m_otherMatcher = p; // the first matcher will need this to be set later
38 m_firstPM = (!p); 37 m_firstPM = (!p);
39 m_frameCount = 0; 38 m_frameCount = 0;
58 void 57 void
59 Matcher::init() 58 Matcher::init()
60 { 59 {
61 if (m_initialised) return; 60 if (m_initialised) return;
62 61
63 m_frames = vector<vector<double> > 62 m_frames = vector<vector<double> >(m_blockSize);
64 (m_blockSize, vector<double>(m_featureSize, -1.0));
65 63
66 m_distXSize = m_blockSize * 2; 64 m_distXSize = m_blockSize * 2;
67 65
68 size(); 66 size();
69 67