Mercurial > hg > x
comparison multires.h @ 1:6422640a802f
first upload
author | Wen X <xue.wen@elec.qmul.ac.uk> |
---|---|
date | Tue, 05 Oct 2010 10:45:57 +0100 |
parents | |
children | 5f3c32dc6e17 |
comparison
equal
deleted
inserted
replaced
0:9b9f21935f24 | 1:6422640a802f |
---|---|
1 #ifndef multiresH | |
2 #define multiresH | |
3 | |
4 /* | |
5 multires.cpp - composite spectrogram routines | |
6 | |
7 This unit deals with basis selection from multiresolution Fourier bases set. | |
8 | |
9 A tiling of an area of the T-F plane is represented as a sequence of 0's and 1's, each 0 represents | |
10 a horizontal split-in-half, each 1 represents a vertical split-in-half. The sequence is made up of | |
11 three pieces: 1) the first entry giving the direction of primary split; 2) the tiling of the upper | |
12 or left half after the primary split; and 3) the tiling of the lower or right half. | |
13 | |
14 A composite spectrogram is represented as a tiling and a vector of amplitude (or square amplitude) | |
15 values, each representing the energy within a tile. If the primary split is horizontal, then the | |
16 first/second half of the amplitude or power vector represents the the upper/lower half of the | |
17 composite spectrogram; if the primary splits is vertical, then the first/second half of the amplitude | |
18 or power vector represents the left/right half of the composite spectrogram. | |
19 | |
20 Further reading: Wen X. and M. Sandler, "Composite spectrogram using multiple fourier transforms," | |
21 IET Signal Processing, 3(1):51-63, 2009. | |
22 */ | |
23 | |
24 //--memory re-indexing routines for internal use----------------------------- | |
25 void HSplitSpec(int X, int Y, double** Spec, double**& lSpec, double**& uSpec); | |
26 void HSplitSpecs(int N, double*** Specs, double***& lSpecs, double***& uSpecs); | |
27 void VSplitSpec(int X, int Y, double** Spec, double**& lSpec, double**& rSpec); | |
28 void VSplitSpecs(int N, double*** Specs, double***& lSpecs, double***& rSpecs); | |
29 | |
30 //--composite spectrogram algorithms----------------------------------------- | |
31 double MixSpectrogram(double** Spec, double*** Specs, int Fr, int WID, int wid, bool norm=true, bool normmix=true, int*** cuts=0); | |
32 double MixSpectrogram(int** spl, double** Spec, double*** Specs, int Fr, int WID, int wid, bool norm=true, bool normmix=true); | |
33 #endif |