diff matchAnnotationSrc/testApp.h @ 50:158f5f38e9d3

outputting exact difference for annotations, comparison with match annotations is now working over all rwc files
author Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk>
date Thu, 29 Mar 2012 13:41:59 +0100
parents 3ce6dadd8167
children ef30f465a904
line wrap: on
line diff
--- a/matchAnnotationSrc/testApp.h	Fri Mar 23 10:53:57 2012 +0000
+++ b/matchAnnotationSrc/testApp.h	Thu Mar 29 13:41:59 2012 +0100
@@ -6,6 +6,15 @@
 #include "matchAnnotations.h"
 #include "jnmrMidiPlayerAnnotations.h"
 
+struct TimingResult{
+	double median;
+	double mean;
+	int count;
+	double percentileCount[7];
+	double percentiles[7];
+	int type;
+};
+
 class testApp : public ofBaseApp{
 
 	public:
@@ -33,13 +42,23 @@
 	void loadAnnotation(const int& fileID);
 	
 	string matchPath;
+	std::string makeMatchFilename( const int& fileID, std::string matchEnd);
 	
 	matchAnnotations matchNotations;
 	
 	string jnmrPlayerPath, jnmrPlayerRoot;
 	jnmrMidiPlayerAnnotations jnmrPlayerAnnotations;
 	
-	void calculateMatchErrors();
-	void sortDifferenceVector(vector<float> diffVec);
+	void calculateMatchErrors(TimingResult& t);
+	void calculateMatchForwardErrors(TimingResult& t);
 	
+	void sortDifferenceVector(vector<float> diffVec, TimingResult& t);
+	void addToPercentiles(float value, TimingResult& t);
+	
+	vector<TimingResult> matchOF_results;
+	vector<TimingResult> matchOB_results;
+	vector<TimingResult> JNMR_MidiMatcher_results;
+	
+	void getResults(const int& fileID);
+	int fileNumberToTest;
 };