-
Notifications
You must be signed in to change notification settings - Fork 1
/
demo_Analysis_Measurement_v01_scrambled.m
37 lines (32 loc) · 1.35 KB
/
demo_Analysis_Measurement_v01_scrambled.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
% demo show measurement
clear
for netId = [1]
network = ['SS-DCS' num2str(netId)];
% network = 'CSNet';
for subRate = [ 0.2 0.3]
modelName = [network '_r' num2str(subRate)];
folderTest = 'Classic13_512';
ext = {'*.jpg','*.png','*.bmp', '*.pgm', '*.tif'};
filePaths = [];
for i = 1 : length(ext)
filePaths = cat(1,filePaths, dir(fullfile('testsets',folderTest,ext{i})) );
end
for i = 1:1:4%numel(filePaths)
[~,nameCur,extCur] = fileparts(filePaths(i).name);
data = load(['histResults\' network '\' nameCur '_r' num2str(subRate) '.mat' ]);
noDim = floor(sqrt(size(data.Y, 3)));
t_im1 = [];
for i1 = 1:1:size(data.Y, 1)
t_im2 = [];
for i2 = 1:1:size(data.Y, 2)
im_ = reshape(squeeze(data.Y(i1, i2, 1:noDim^2)), [noDim, noDim]);
t_im2 = [t_im2, im_];
end
t_im1 = [t_im1; t_im2];
end
imagesc(t_im1); axis square;axis off; colormap(gray); colorbar; set(gca, 'fontsize', 20);
if ~exist(['Results_Meas_Analysis\' network '\']), mkdir(['Results_Meas_Analysis\' network '\']); end
im = export_fig; imwrite(im, ['Results_Meas_Analysis\' network '\' nameCur '_r' num2str(subRate) '_grey.tif']);
end
end
end