File size: 939 Bytes
18ac00c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
fileFolder=fullfile('/Users/miaoyuchun/Desktop/superx2/test_Houston/');
dirOutput=dir(fullfile(fileFolder,'*.mat'));
fileNames={dirOutput.name};
factor = 0.5;
img_size = 256;
bands = 48;
gt = zeros(numel(fileNames),img_size,img_size,bands);
ms = zeros(numel(fileNames),img_size*factor,img_size*factor,bands);
ms_bicubic = zeros(numel(fileNames),img_size,img_size,bands);
% testFolder=fullfile('.\Cave\test\');
%testOutput=dir(fullfile(testFolder,'*.mat'));
%testNames={testOutput.name};

% cd test_Chikusei;
% cd test_Houston;
cd test_Houston;
for i = 1:numel(fileNames)
    load(fileNames{i},'test');
    img_ms = single(imresize(test, factor));
    gt(i,:,:,:) = test;
    ms(i,:,:,:) = img_ms;
    ms_bicubic(i,:,:,:) = single(imresize(img_ms, 1/factor));
end

cd ..;
gt = single(gt);
ms = single(ms);
ms_bicubic = single(ms_bicubic);
save('/Users/miaoyuchun/Desktop/superx2/dataset/Houston_x2/Houston_x2.mat','gt','ms','ms_bicubic');