-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathcollect_test_subset.m
34 lines (26 loc) · 1.26 KB
/
collect_test_subset.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
function [] = collect_test_subsets()
% function [] = collect_test_subsets()
%
% Collects the test subset given by list_test_subset.txt.
%
% David Stutz <[email protected]>
load './nyu_tools/list_test_subset.txt' list_test_subset
baseDir = './NYUDepthV2/cropped-original/data';
depthSubDir = sprintf('%s/depth/test_subset', baseDir);
if ~exist(depthSubDir)
system(sprintf('mkdir %s', depthSubDir));
end;
rawDepthSubDir = sprintf('%s/rawDepth/test_subset', baseDir);
if ~exist(rawDepthSubDir)
system(sprintf('mkdir %s', rawDepthSubDir));
end;
groundTruthSubDir = sprintf('%s/groundTruth/test_subset', baseDir);
if ~exist(groundTruthSubDir)
system(sprintf('mkdir %s', groundTruthSubDir));
end;
for i = 1: size(list_test_subset, 1)
system(sprintf('cp %s/images/test/%08d.jpg %s/images/test_subset/%08d.jpg', baseDir, list_test_subset(i), baseDir, list_test_subset(i)));
system(sprintf('cp %s/groundTruth/test/%08d.mat %s/groundTruth/test_subset/%08d.mat', baseDir, list_test_subset(i), baseDir, list_test_subset(i)));
system(sprintf('cp %s/depth/test/%08d.png %s/depth/test_subset/%08d.png', baseDir, list_test_subset(i), baseDir, list_test_subset(i)));
end;
end