-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathplotclustersr.m
More file actions
36 lines (21 loc) · 1.03 KB
/
plotclustersr.m
File metadata and controls
36 lines (21 loc) · 1.03 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
examplarv = unique (idxV); % idx is ap result - examplar return canonical image
for i = 1:size(examplarv)
clusterv (i).examplar = examplarv(i); % save center of cluster in structure
clusterv (i).cluster = find (idxV == examplarv(i)); % save related photo with each cluster in structure
end
for ii = 1:100
f = figure('position', [0, 0, 1800, 900]);
for i = 1:size(clusterv(ii).cluster,1)
n = floor(sqrt(size(clusterv(ii).cluster,1)))+1;
[X1,map1]=imread(fullfile(params.imgsDir,random_image_1K_dir_listing(clusterv(ii).cluster(i,1)).name));
subplot(n,n,i), imshow(X1,map1)
end
end
for ii = 1:size(clusterv,2)
f = figure('position', [0, 0, 1800, 900]);
for i = 1:size(clusterv(ii).cluster,1)
n = floor(sqrt(size(clusterv(ii).cluster,1)))+1;
[X1,map1]=imread(fullfile(params.imgsDir,strcat(param.images{clusterv(ii).cluster(i,1),1},'.jpg')));
subplot(n,n,i), imshow(X1,map1)
end
end