Mercurial > hg > match-vamp
comparison src/FeatureConditioner.cpp @ 140:cfba9aec7569 refactors
Separate out the raw & conditioned feature outputs (previously only conditioned was available, but we want raw for our tests). Plus some optional debug output
author | Chris Cannam |
---|---|
date | Thu, 08 Jan 2015 12:11:27 +0000 |
parents | b62dbe2ba958 |
children | d1bc89794cd4 |
comparison
equal
deleted
inserted
replaced
139:b62dbe2ba958 | 140:cfba9aec7569 |
---|---|
17 | 17 |
18 #include <iostream> | 18 #include <iostream> |
19 #include <cmath> | 19 #include <cmath> |
20 | 20 |
21 using namespace std; | 21 using namespace std; |
22 | |
23 //#define DEBUG_FEATURE_CONDITIONER 1 | |
24 | |
25 FeatureConditioner::FeatureConditioner(Parameters parameters) : | |
26 m_params(parameters), | |
27 m_ltAverage(0.0) | |
28 { | |
29 #ifdef DEBUG_FEATURE_CONDITIONER | |
30 cerr << "*** FeatureConditioner: norm = " << parameters.norm | |
31 << ", order = " << parameters.order | |
32 << ", silenceThreshold = " << parameters.silenceThreshold | |
33 << ", decay = " << parameters.decay << endl; | |
34 #endif | |
35 } | |
22 | 36 |
23 vector<double> | 37 vector<double> |
24 FeatureConditioner::process(const vector<double> &feature) | 38 FeatureConditioner::process(const vector<double> &feature) |
25 { | 39 { |
26 if (m_prev.empty()) { | 40 if (m_prev.empty()) { |