qm-dsp
1.8
|
00001 #ifndef _CLUSTER_SEGMENTER_H 00002 #define _CLUSTER_SEGMENTER_H 00003 00004 /* 00005 * cluster_segmenter.h 00006 * soundbite 00007 * 00008 * Created by Mark Levy on 06/04/2006. 00009 * Copyright 2006 Centre for Digital Music, Queen Mary, University of London. 00010 00011 This program is free software; you can redistribute it and/or 00012 modify it under the terms of the GNU General Public License as 00013 published by the Free Software Foundation; either version 2 of the 00014 License, or (at your option) any later version. See the file 00015 COPYING included with this distribution for more information. 00016 * 00017 */ 00018 00019 #include <stdio.h> 00020 #include <stdlib.h> 00021 #include <math.h> 00022 #include <float.h> 00023 00024 #include "segment.h" 00025 #include "cluster_melt.h" 00026 #include "hmm/hmm.h" 00027 #include "maths/pca/pca.h" 00028 00029 #ifdef __cplusplus 00030 extern "C" { 00031 #endif 00032 00033 /* applies MPEG-7 normalisation to constant-Q features, storing normalised envelope (norm) in last feature dimension */ 00034 void mpeg7_constq(double** features, int nframes, int ncoeff); 00035 00036 /* converts constant-Q features to normalised chroma */ 00037 void cq2chroma(double** cq, int nframes, int ncoeff, int bins, double** chroma); 00038 00039 void create_histograms(int* x, int nx, int m, int hlen, double* h); 00040 00041 void cluster_segment(int* q, double** features, int frames_read, int feature_length, int nHMM_states, 00042 int histogram_length, int nclusters, int neighbour_limit); 00043 00044 void constq_segment(int* q, double** features, int frames_read, int bins, int ncoeff, int feature_type, 00045 int nHMM_states, int histogram_length, int nclusters, int neighbour_limit); 00046 00047 #ifdef __cplusplus 00048 } 00049 #endif 00050 00051 #endif