Mercurial > hg > match-vamp
comparison src/MatchPipeline.cpp @ 106:921a88e8859d feature_conditioner
Permit retrieving features
author | Chris Cannam |
---|---|
date | Thu, 04 Dec 2014 13:43:00 +0000 |
parents | 3f46ce2d2874 |
children | 14a1664d1cfe 42381e437fcd |
comparison
equal
deleted
inserted
replaced
105:3f46ce2d2874 | 106:921a88e8859d |
---|---|
43 } | 43 } |
44 | 44 |
45 void | 45 void |
46 MatchPipeline::feedFeatures(const vector<double> &f1, const vector<double> &f2) | 46 MatchPipeline::feedFeatures(const vector<double> &f1, const vector<double> &f2) |
47 { | 47 { |
48 m_f1 = f1; | |
49 m_f2 = f2; | |
50 | |
48 feedConditionedFeatures(m_fc1.process(f1), m_fc2.process(f2)); | 51 feedConditionedFeatures(m_fc1.process(f1), m_fc2.process(f2)); |
49 } | 52 } |
50 | 53 |
51 void | 54 void |
52 MatchPipeline::feedConditionedFeatures(const vector<double> &f1, const vector<double> &f2) | 55 MatchPipeline::feedConditionedFeatures(const vector<double> &c1, const vector<double> &c2) |
53 { | 56 { |
54 m_feeder.feed(f1, f2); | 57 m_c1 = c1; |
58 m_c2 = c2; | |
59 | |
60 m_feeder.feed(c1, c2); | |
55 | 61 |
56 if (aboveThreshold(f1)) m_lastFrameIn1 = m_frameNo; | 62 if (aboveThreshold(c1)) m_lastFrameIn1 = m_frameNo; |
57 if (aboveThreshold(f2)) m_lastFrameIn2 = m_frameNo; | 63 if (aboveThreshold(c2)) m_lastFrameIn2 = m_frameNo; |
58 | 64 |
59 ++m_frameNo; | 65 ++m_frameNo; |
66 } | |
67 | |
68 void | |
69 MatchPipeline::extractFeatures(vector<double> &f1, vector<double> &f2) | |
70 { | |
71 f1 = m_f1; | |
72 f2 = m_f2; | |
73 } | |
74 | |
75 void | |
76 MatchPipeline::extractConditionedFeatures(vector<double> &c1, vector<double> &c2) | |
77 { | |
78 c1 = m_c1; | |
79 c2 = m_c2; | |
60 } | 80 } |
61 | 81 |
62 bool | 82 bool |
63 MatchPipeline::aboveThreshold(const vector<double> &f) | 83 MatchPipeline::aboveThreshold(const vector<double> &f) |
64 { | 84 { |