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

Download this file

44 lines (30 with data), 1.1 kB

 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
38
39
40
function [ftest_all, numFeatures] = ...
featExtrGaborAdapt(imagesCellTest, V, PCANet, bestWavelets, param, numImagesTest, stepPrint)
%one iteration to get size and init
ftest = Gabor_FeaExt(imagesCellTest(1), V, PCANet, bestWavelets, param);
numFeatures = size(ftest,1);
%init feature matrix
ftest_all = sparse(numFeatures, numImagesTest);
ftest_all(:, 1) = ftest;
%start pool
%parto da 2 perchŔ 1 ho giÓ fatto
parfor j = 2 : numel(imagesCellTest)
% for j = 2 : length(vectorIndexTest)
%get id of current worker
% t = getCurrentTask();
%display progress
if mod(j, stepPrint) == 0
% fprintf(1, ['\t\tCore ' num2str(t.ID) ': ' num2str(j) ' / ' num2str(numImagesTest) '\n'])
end %if mod(i, 100) == 0
%imt = im2double(imread([dirDB filenameTest{j}]));
%image size must be a power of 2
%imt = imresize(imt, imageSize);
%get image
im = imagesCellTest(j);
%PCANet output
ftest = Gabor_FeaExt(im, V, PCANet, bestWavelets, param);
%whos ftest
%save descriptor
%w/out wpca
ftest_all(:, j) = ftest;
end %parfor i = 1 : numImagesTest