cr = filterbanksynchrosqueeze(c,tgrad,cfreq); cr = filterbanksynchrosqueeze(c,tgrad,g); [cr,repos,Lc] = filterbanksynchrosqueeze(...);
c | Coefficients to be synchrosqueezed. |
tgrad | Instantaneous frequency relative to original position. |
cfreq | Vector of relative center frequencies in ]-1,1]. |
g | Set of filters. |
cr | Synchrosqueezed filterbank coefficients. |
repos | Reassigned positions. |
Lc | Subband lengths. |
filterbanksynchrosqueeze(c,tgrad,cfreq) will reassign the values of the filterbank coefficients c according to instantaneous frequency tgrad. The frequency center frequencies of filters are given by cfreq. The filterbank coefficients c are assumed to be obtained from a non-subsampled filterbank (a=1).
filterbanksynchrosqueeze(s,tgrad,g) will do the same thing except the center frequencies are estimated from a set of filters g.
[sr,repos,Lc]=filterbanksynchrosqueeze(...) does the same thing, but in addition returns a vector of subband lengths Lc (Lc = cellfun(@numel,s)) and cell array repos with sum(Lc) elements. Each element corresponds to a single coefficient obtained by cell2mat(sr) and it is a vector of indices identifying coefficients from cell2mat(s) assigned to the particular time-frequency position.
The arguments s, tgrad must be cell-arrays of vectors of the same lengths. Arguments cfreq or g must have the same number of elements as the cell arrays with coefficients.
This example shows how to synchrosqueeze a ERB filterbank spectrogram:
% Genrate 3 chirps half a second long L = 22050; fs = 44100; l = 0:L-1; f = sin(2*pi*(l/35+(l/300).^2)) + ... sin(2*pi*(l/10+(l/300).^2)) + ... sin(2*pi*(l/5-(l/450).^2)); f = 0.7*f'; % Create ERB filterbank [g,~,fc]=erbfilters(fs,L,'uniform','spacing',1/12,'warped'); % Compute phase gradient [tgrad,~,~,c]=filterbankphasegrad(f,g,1); % Do the reassignment sr=filterbanksynchrosqueeze(c,tgrad,cent_freqs(fs,fc)); figure(1); subplot(211); plotfilterbank(c,1,fc,fs,60); title('ERBlet spectrogram of 3 chirps'); subplot(212); plotfilterbank(sr,1,fc,fs,60); title('Synchrosqueezed ERBlet spectrogram of 3 chirps');
N. Holighaus, Z. Průša, and P. L. Søndergaard. Reassignment and synchrosqueezing for general time-frequency filter banks, subsampling and processing. Signal Processing, 125:1--8, 2016. [ DOI | http ]