diff 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
line wrap: on
line diff
--- a/src/MatchPipeline.cpp	Thu Dec 04 13:35:23 2014 +0000
+++ b/src/MatchPipeline.cpp	Thu Dec 04 13:43:00 2014 +0000
@@ -45,20 +45,40 @@
 void
 MatchPipeline::feedFeatures(const vector<double> &f1, const vector<double> &f2)
 {
+    m_f1 = f1;
+    m_f2 = f2;
+
     feedConditionedFeatures(m_fc1.process(f1), m_fc2.process(f2));
 }
 
 void
-MatchPipeline::feedConditionedFeatures(const vector<double> &f1, const vector<double> &f2)
+MatchPipeline::feedConditionedFeatures(const vector<double> &c1, const vector<double> &c2)
 {
-    m_feeder.feed(f1, f2);
+    m_c1 = c1;
+    m_c2 = c2;
+    
+    m_feeder.feed(c1, c2);
 
-    if (aboveThreshold(f1)) m_lastFrameIn1 = m_frameNo;
-    if (aboveThreshold(f2)) m_lastFrameIn2 = m_frameNo;
+    if (aboveThreshold(c1)) m_lastFrameIn1 = m_frameNo;
+    if (aboveThreshold(c2)) m_lastFrameIn2 = m_frameNo;
 
     ++m_frameNo;
 }
 
+void
+MatchPipeline::extractFeatures(vector<double> &f1, vector<double> &f2)
+{
+    f1 = m_f1;
+    f2 = m_f2;
+}
+
+void
+MatchPipeline::extractConditionedFeatures(vector<double> &c1, vector<double> &c2)
+{
+    c1 = m_c1;
+    c2 = m_c2;
+}
+
 bool
 MatchPipeline::aboveThreshold(const vector<double> &f)
 {