Mercurial > hg > qm-dsp
comparison dsp/segmentation/cluster_segmenter.c @ 245:cdfd0948a852
* First cut at properly integrating the segmenter and making it work right
author | Chris Cannam <c.cannam@qmul.ac.uk> |
---|---|
date | Wed, 09 Jan 2008 16:50:04 +0000 |
parents | dc30e3864ceb |
children | 6fc20388d29e |
comparison
equal
deleted
inserted
replaced
244:f599563a4663 | 245:cdfd0948a852 |
---|---|
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]; |