comparison 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
comparison
equal deleted inserted replaced
105:3f46ce2d2874 106:921a88e8859d
59 * represent feature frames from two different sources. They will 59 * represent feature frames from two different sources. They will
60 * be passed in to FeatureConditioner and then on to the rest of 60 * be passed in to FeatureConditioner and then on to the rest of
61 * the pipeline. 61 * the pipeline.
62 */ 62 */
63 void feedFeatures(const vector<double> &f1, const vector<double> &f2); 63 void feedFeatures(const vector<double> &f1, const vector<double> &f2);
64 64
65 /** 65 /**
66 * Feed in data at the third pipeline stage. The vectors represent 66 * Feed in data at the third pipeline stage. The vectors represent
67 * conditioned feature frames from two different sources. They 67 * conditioned feature frames from two different sources. They
68 * will be passed to MatchFeatureFeeder for feeding to the two 68 * will be passed to MatchFeatureFeeder for feeding to the two
69 * matchers. 69 * matchers.
70 */ 70 */
71 void feedConditionedFeatures(const vector<double> &f1, const vector<double> &f2); 71 void feedConditionedFeatures(const vector<double> &f1, const vector<double> &f2);
72
73 /**
74 * If a frame was just fed in at the first or second pipeline
75 * stage, it can be retrieved from the second stage here. That is,
76 * if you provided frequency-domain audio, extractFeatures will
77 * give you back the FeatureExtractor's features.
78 */
79 void extractFeatures(vector<double> &f1, vector<double> &f2);
80
81 /**
82 * Retrieve the conditioned features from the third pipeline stage.
83 */
84 void extractConditionedFeatures(vector<double> &f1, vector<double> &f2);
72 85
73 /** 86 /**
74 * Indicate that both inputs have come to an end. 87 * Indicate that both inputs have come to an end.
75 */ 88 */
76 void finish(); 89 void finish();
86 Matcher m_pm2; 99 Matcher m_pm2;
87 MatchFeatureFeeder m_feeder; 100 MatchFeatureFeeder m_feeder;
88 int m_lastFrameIn1; 101 int m_lastFrameIn1;
89 int m_lastFrameIn2; 102 int m_lastFrameIn2;
90 int m_frameNo; 103 int m_frameNo;
104 vector<double> m_f1;
105 vector<double> m_f2;
106 vector<double> m_c1;
107 vector<double> m_c2;
91 bool aboveThreshold(const vector<double> &f); 108 bool aboveThreshold(const vector<double> &f);
92 }; 109 };
93 110
94 #endif 111 #endif