Example #1
0
int
analyze_abc_file (char *filename)
{
  FILE *fp;
  fp = fopen (filename, "rt");
  if (fp == NULL)
    {
      printf ("cannot open file %s\n", filename);
      exit (0);
    }
  init_histograms ();
  while (!feof (fp))
    {
      fileindex++;
      startfile ();
      parsetune (fp);
/*     printf("fileindex = %d xrefno =%d\n",fileindex,xrefno); */
/*     printf("%s\n",titlename); */
      if (notes < 10)
	continue;
      /*print_feature_list(); */
      make_note_representation (&innotes, &inbars, imaxnotes, imaxbars,
				&itimesig_num, &itimesig_denom, ibarlineptr,
				inotelength, imidipitch);
      compute_note_histograms ();
      if (action == cpitch_histogram_table)
	{
	  printf ("%4d %s %s\n%s\n", xrefno, filename, keysignature,
		  titlename);
	  make_and_print_pitch_pdf ();
	  init_histograms ();
	}
      if (action == interval_pdf_table)
	{
	  printf ("%4d %s %s\n%s\n", xrefno, filename, keysignature,
		  titlename);
	  make_and_print_interval_pdf ();
	  init_histograms ();
	}

    }
  fclose (fp);
  switch (action)
    {
    case cpitch_histogram:
      print_pitch_histogram ();
      break;
    case cwpitch_histogram:
      print_weighted_pitch_histogram ();
      break;
    case clength_histogram:
      print_length_histogram ();
      break;
    case interval_pdf:
      print_interval_pdf ();
      break;
    }
  return (0);
}
	CSkinFeatureExtractor::CSkinFeatureExtractor() : LevelNum(256), UnitNum(0.00001), pAdultScore(NULL), isEnableSegment(ENABLE_SEGMENT)
	{
		m_bEnableROIDetection = false;
		m_bEnableFaceDetection = false;
		init_histograms(foldername, histnum);
	}