comparison dsp/segmentation/cluster_segmenter.c @ 20:8bdbda7fb893

* First cut at properly integrating the segmenter and making it work right
author cannam
date Wed, 09 Jan 2008 16:50:04 +0000
parents 8e90a56b4b5f
children 6fc20388d29e
comparison
equal deleted inserted replaced
19:d3a856b44c43 20:8bdbda7fb893
34 sum = 0; 34 sum = 0;
35 for (b = 0; b < bins; b++) 35 for (b = 0; b < bins; b++)
36 sum += chroma[t][b]; 36 sum += chroma[t][b];
37 for (b = 0; b < bins; b++) 37 for (b = 0; b < bins; b++)
38 chroma[t][b] /= sum; 38 chroma[t][b] /= sum;
39 */
39 /* normalise to unit max - NO this made results much worse! 40 /* normalise to unit max - NO this made results much worse!
40 maxchroma = 0; 41 maxchroma = 0;
41 for (b = 0; b < bins; b++) 42 for (b = 0; b < bins; b++)
42 if (chroma[t][b] > maxchroma) 43 if (chroma[t][b] > maxchroma)
43 maxchroma = chroma[t][b]; 44 maxchroma = chroma[t][b];