diff src/MatchPipeline.h @ 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.h	Thu Dec 04 13:35:23 2014 +0000
+++ b/src/MatchPipeline.h	Thu Dec 04 13:43:00 2014 +0000
@@ -61,7 +61,7 @@
      * the pipeline.
      */
     void feedFeatures(const vector<double> &f1, const vector<double> &f2);
-
+    
     /**
      * Feed in data at the third pipeline stage. The vectors represent
      * conditioned feature frames from two different sources. They
@@ -71,6 +71,19 @@
     void feedConditionedFeatures(const vector<double> &f1, const vector<double> &f2);
 
     /**
+     * If a frame was just fed in at the first or second pipeline
+     * stage, it can be retrieved from the second stage here. That is,
+     * if you provided frequency-domain audio, extractFeatures will
+     * give you back the FeatureExtractor's features.
+     */
+    void extractFeatures(vector<double> &f1, vector<double> &f2);
+
+    /**
+     * Retrieve the conditioned features from the third pipeline stage.
+     */
+    void extractConditionedFeatures(vector<double> &f1, vector<double> &f2);
+
+    /**
      * Indicate that both inputs have come to an end.
      */
     void finish();
@@ -88,6 +101,10 @@
     int m_lastFrameIn1;
     int m_lastFrameIn2;
     int m_frameNo;
+    vector<double> m_f1;
+    vector<double> m_f2;
+    vector<double> m_c1;
+    vector<double> m_c2;
     bool aboveThreshold(const vector<double> &f);
 };