source: birds/domilbirds.m @ 53

Last change on this file since 53 was 53, checked in by dtax, 11 years ago

Iets meer.

File size: 580 bytes
Line 
1% directory where the WAV-files of the birds are stored:
2dpath = fullfile(mildatapath,'birds');
3
4fname = 'PC13_20090531_050000_1.wav';
5%fname = 'PC8_20090531_050000_99.wav';
6[signal,fs] = wavread(fullfile(dpath,'wavs',fname));
7
8[S,f,t] = spectrogram(signal,512,256,[],fs);
9
10figure(2); clf; showspec(S,f,t);
11figure(3); clf; showspec(imag(S), f,t);
12
13% smooth and threshold the spectrogram?
14G = fspecial('gaussian',[5 5],2); % window 5x5, sigma=2
15I = imfilter(abs(S),G,'same');
16t = dd_threshold(I(:),0.8);
17mask = (I>t);
18mask(f<2000,:) = 0;
19
20figure(4); clf; imagesc(mask); axis xy;
21
22
Note: See TracBrowser for help on using the repository browser.