Changeset 58 for birds/domilbirds.m


Ignore:
Timestamp:
06/14/13 17:31:23 (11 years ago)
Author:
vcheplygina
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • birds/domilbirds.m

    r57 r58  
    1717figure(3); clf; showspec(imag(S), f,t);
    1818
     19%%
    1920% smooth and threshold the spectrogram?
    2021G = fspecial('gaussian',[5 5],2); % window 5x5, sigma=2
     
    3334%%
    3435s2 = specwhiten(S,fmax);
    35 figure(4); imagesc(t,f,s2);
     36figure(5); imagesc(t,f,s2);
    3637axis xy; xlabel('time (s)'); ylabel('freq.');
     38
     39% smooth and threshold the spectrogram?
     40G = fspecial('gaussian',[5 5],2); % window 5x5, sigma=2
     41I = imfilter(abs(s2),G,'same');
     42t = dd_threshold(I(:),0.95);
     43mask = (I>t);
     44mask(f<2000,:) = 0;
     45
     46figure(6); clf; imagesc(mask); axis xy;    %Ja, dit ziet er vergelijkbaar uit, iets minder kleine blobs aanwezig geloof ik?
     47% measure something:
     48x = regionprops(bwlabel(mask),abs(s2));
     49y = x([x.Area]>10)
     50
Note: See TracChangeset for help on using the changeset viewer.