% Convert HS dataset to patches % List all '.mat' file in folder % file_folder=fullfile('.\train'); file_folder=fullfile('/Users/miaoyuchun/Desktop/superx2/train_Houston'); file_list=dir(fullfile(file_folder,'*.mat')); file_names={file_list.name}; % store cropped images in folders for i = 1:1:numel(file_names) name = file_names{i}; name = name(1:end-4); load(strcat('/Users/miaoyuchun/Desktop/superx2/train_Houston/',file_names{i})); %crop_image(img, 256, 128, 0.125, name); crop_image(img, 128, 32, 0.5, name); %crop_image(img, 128, 32, 0.125, name); % crop(img, 512, 512, 0.5, name); %crop_image(img, 128, 64, 0.25, name); end