-
Notifications
You must be signed in to change notification settings - Fork 0
/
FixNormalizationInGraphs.m
executable file
·63 lines (48 loc) · 1.83 KB
/
FixNormalizationInGraphs.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
51
52
53
54
55
56
57
58
59
60
61
62
63
clear;
K = 3;
L = 21;
load('Index');
features_names{1} = 'dial_color_hist';
features_names{2} = 'sift_hist_dial';
features_names{3} = 'dial_text_hist_mr';
features_names{4} = 'sift_hist_int_';
features_names{5} = 'int_text_hist_mr';
features_names{6} = 'color_hist';
ImIdxA = 1:2:length(Index);
ImIdxB = 2:2:length(Index);
postfix = 'zombie';
suffix = 'A_full';
Skeleton = sparse(TotalSP, TotalSP);
%alpha = [0.2 0.8];
% for i = 1 : length(features_names)
%
% load(['Graph_' features_names{i} '_' num2str(K) '_' num2str(L) '_' suffix '.mat']);
% Graph = max(Graph, Graph');
% Skeleton = Skeleton + (Graph > 0);
% % load(['Graph_' features_names{i} '_' num2str(K) '_' num2str(L) '_' 'neibs' '.mat']);
% % Gr_tot = Gr_tot + alpha(i + 1) * Graph;
% end
%Skeleton = Skeleton > 0;
for i = 1 :length(features_names)
load(['Graph_' features_names{i} '_' num2str(K) '_' num2str(L) '_' suffix '.mat']);
Skeleton = Graph > 0;
disp([features_names{i} ' _ ' suffix]);
GraphA = BuildGraphsOnSkeleton(suffix, postfix, 'Index.mat', Skeleton, features_names{i}, K, L);
end
suffix = 'B_full';
Skeleton = sparse(TotalSP, TotalSP);
%alpha = [0.2 0.8];
% for i = 1 : 1 %length(features_names)
% load(['Graph_' features_names{i} '_' num2str(K) '_' num2str(L) '_' suffix '.mat']);
% Graph = max(Graph, Graph');
% Skeleton = Skeleton + Graph > 0;
% % load(['Graph_' features_names{i} '_' num2str(K) '_' num2str(L) '_' 'neibs' '.mat']);
% % Gr_tot = Gr_tot + alpha(i + 1) * Graph;
% end
Skeleton = Skeleton > 0;
for i = 1 :length(features_names)
load(['Graph_' features_names{i} '_' num2str(K) '_' num2str(L) '_' suffix '.mat']);
Skeleton = Graph > 0;
disp([features_names{i} ' _ ' suffix]);
GraphB = BuildGraphsOnSkeleton(suffix, postfix, 'Index.mat', Skeleton, features_names{i}, K, L);
end