[1422d3]: / functions / functions_Gabor / computeFrequencyGaborArray.m

Download this file

30 lines (20 with data), 648 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
function totFreq = computeFrequencyGaborArray(gaborBank, plotta)
%init
gb_ex = gaborBank(end).even;
totFreq = zeros(size(gb_ex,1), size(gb_ex,2));
%compute spectrum of each filter
%all frequencies covered by fixed gabor bank
for v = 1 : numel(gaborBank)
gbResize = imresize(gaborBank(v).even, [size(gb_ex,1) size(gb_ex,2)]);
FV = fft2(gbResize);
FVdisp = fftshift(abs(FV));
%figure
%imshow(FVdisp,[]);
totFreq = max(totFreq, FVdisp);
end %for v = 1 : size(V,3)
%plot spectrum combined
if plotta
figure
imshow(totFreq, []);
title('Combined spectrums of Gabor filters')
end %if plotta