comparison matchAnnotationSrc/testApp.cpp @ 52:13194a9dca77 tip

Added exporting of image and text data
author Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk>
date Tue, 17 Jul 2012 22:13:10 +0100
parents ef30f465a904
children
comparison
equal deleted inserted replaced
51:ef30f465a904 52:13194a9dca77
2 const int totalNumberFiles = 61; 2 const int totalNumberFiles = 61;
3 //-------------------------------------------------------------- 3 //--------------------------------------------------------------
4 void testApp::setup(){ 4 void testApp::setup(){
5 //fixed stuff 5 //fixed stuff
6 annotationRoot = "/Users/andrew/Documents/work/Alignment/MuseScore/RWC/ANNOTATION/RM-C0"; 6 annotationRoot = "/Users/andrew/Documents/work/Alignment/MuseScore/RWC/ANNOTATION/RM-C0";
7 jnmrPlayerRoot = "/Users/andrew/Documents/work/programming/of_preRelease_v007_osx/apps/myOpenFrameworks007/JNMR_MidiFollower/bin/data/FilesOut/completeTestsTempoMAPestimate/rwcOutputData_RM-C0"; 7 jnmrPlayerRoot = "/Users/andrew/Documents/work/programming/of_preRelease_v007_osx/apps/myOpenFrameworks007/JNMR_MidiFollower/bin/data/FilesOut/";
8
9 //set which parameter set to test
10 jnmrPlayerRoot += "rwc_output_likelihood0pt6";//width 100ms
11 // jnmrPlayerRoot += "rwcOutput_likelihood0pt8_width50";
12 // jnmrPlayerRoot += "completeTestsTempoMAPestimate_likelihood0pt2";
13
14 jnmrPlayerRoot += "/rwcOutputData_RM-C0";
8 // matchRoot = "/Users/andrew/Documents/work/programming/Shell Scripts/MatchAudioToMidiOutput/RWCmatch_RM-C";//ACTUAL AUDIO VERSION OF WARPED 15 // matchRoot = "/Users/andrew/Documents/work/programming/Shell Scripts/MatchAudioToMidiOutput/RWCmatch_RM-C";//ACTUAL AUDIO VERSION OF WARPED
9 matchRoot = "/Users/andrew/Documents/work/programming/Shell Scripts/MatchMidiToMidiOutput/RWCmatch_RM-C";//MIDI VERSION OF WARPED 16 matchRoot = "/Users/andrew/Documents/work/programming/Shell Scripts/MatchMidiToMidiOutput/RWCmatch_RM-C";//MIDI VERSION OF WARPED
10 17
11 createRWCfilenameStrings(); 18 createRWCfilenameStrings();
12 19
276 addToPercentiles(diffVec[i], t); 283 addToPercentiles(diffVec[i], t);
277 } 284 }
278 total /= count; 285 total /= count;
279 286
280 std::sort(diffVec.begin(), diffVec.end());//sort vector 287 std::sort(diffVec.begin(), diffVec.end());//sort vector
281
282 /* printf("SORTED TWO HUNDRED\n");
283
284 for (int i = 0;i < diffVec.size() ;i++){
285 printf("Sort[%i] : %f\n", i, diffVec[i]);
286 }
287 */
288 printf("Count %i Median %3.1f, mean is %3.1f\n", count, diffVec[(int)(diffVec.size()/2)], total);
289
290 t.median = diffVec[(int)(diffVec.size()/2)]; 288 t.median = diffVec[(int)(diffVec.size()/2)];
291 t.mean = total; 289 t.mean = total;
292 t.count = count; 290 t.count = count;
291 printf("Count %i Median %3.1f, mean is %3.1f\n", count, diffVec[(int)(diffVec.size()/2)], total);
293 292
294 for (int i = 0;i < 7;i++){ 293 for (int i = 0;i < 7;i++){
295 t.percentiles[i] = t.percentileCount[i] / count; 294 t.percentiles[i] = t.percentileCount[i] / count;
296 printf("Perc[%i] = %2.1f, ", i, (t.percentiles[i]*100.0)); 295 printf("Perc[%i] = %2.1f, ", i, (t.percentiles[i]*100.0));
297 } 296 }