[1422d3]: / functions / functions_FeatExtr / Gabor_output.m

Download this file

39 lines (29 with data), 786 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
29
30
31
32
33
34
35
36
37
function OutImg = Gabor_output(InImg, bestWavelets, NumFilters)
%init
ImgZ = length(InImg);
OutImg = cell(NumFilters*ImgZ,1);
%init
gaborResponses = cell(ImgZ, 1);
%loop on images
for i = 1 : ImgZ
%image
img = InImg{i};
gaborResponses{i} = computeGaborResponses(img, bestWavelets, NumFilters);
end %parfor i = 1 : ImgZ
%assign to global structure
cnt = 0;
for i = 1 : ImgZ
for j = 1 : NumFilters
cnt = cnt + 1;
OutImg{cnt} = gaborResponses{i}(:,:,j);
% figure(11)
% subplot(1,2,1)
% imshow(OutImg{cnt},[]);
% title(num2str(j))
% subplot(1,2,2)
% imshow(OutImg{cnt}>0,[]);
% pause
end %for j = 1:NumFilters
%clear
InImg{i} = [];
end %for i = 1 : ImgZ