Changeset 58 for birds/domilbirds.m
- Timestamp:
- 06/14/13 17:31:23 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
birds/domilbirds.m
r57 r58 17 17 figure(3); clf; showspec(imag(S), f,t); 18 18 19 %% 19 20 % smooth and threshold the spectrogram? 20 21 G = fspecial('gaussian',[5 5],2); % window 5x5, sigma=2 … … 33 34 %% 34 35 s2 = specwhiten(S,fmax); 35 figure( 4); imagesc(t,f,s2);36 figure(5); imagesc(t,f,s2); 36 37 axis xy; xlabel('time (s)'); ylabel('freq.'); 38 39 % smooth and threshold the spectrogram? 40 G = fspecial('gaussian',[5 5],2); % window 5x5, sigma=2 41 I = imfilter(abs(s2),G,'same'); 42 t = dd_threshold(I(:),0.95); 43 mask = (I>t); 44 mask(f<2000,:) = 0; 45 46 figure(6); clf; imagesc(mask); axis xy; %Ja, dit ziet er vergelijkbaar uit, iets minder kleine blobs aanwezig geloof ik? 47 % measure something: 48 x = regionprops(bwlabel(mask),abs(s2)); 49 y = x([x.Area]>10) 50
Note: See TracChangeset
for help on using the changeset viewer.