-
Notifications
You must be signed in to change notification settings - Fork 0
/
kernel_transform_kernel.m
executable file
·50 lines (38 loc) · 1.31 KB
/
kernel_transform_kernel.m
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
41
42
43
44
45
46
47
48
49
50
function [] = fft_feature()
FreqDomSmpNum = 700;
load('dictionary/videoDatabase_resnet.mat');
videoDatabase = videoDatabase_resnet;
clear videoDatabase_resnet;
nVideo = length(videoDatabase.path);
tic;
for ii = 1:nVideo
if ~mod(ii, 5)
fprintf('%d of total %d processed\n', ii, nVideo);
toc;
end
fpath = videoDatabase.path{ii};
load(fpath);
FeaNum = size(feaSet.validFeaArr, 1);
FeaDim = size(feaSet.validFeaArr, 2);
%FreqDomSmpNum = FeaNum;
%feaSet.domFeaArr =[];
%for jj = 1:FeaDim
%xx = feaSet.validFeaArr(:, jj);
%xx = fft(xx);
%xx = imresize(xx, [FreqDomSmpNum 1]);
%xx = xx(5:round(length(xx)*0.1));
%xxAbs = abs(xx);
%feaSet.domFeaArr(:, jj) = xxAbs;
% if length(xxAbs) > 1000
% xxAbs = xxAbs(1:1000);
% end
% if norm(xxAbs)==0,
% fprintf('stop\n');
% end
tmp_arr = feaSet.domFeaArrLLC;
tmp_arr = (4*tmp_arr+0.5).^(5/4);
feaSet.kernel_domFeaArr = tmp_arr;
% end
save(fpath, 'feaSet');
end
end