forked from phg1024/FaceShapeFromShading-MATLAB
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgen_point_clouds.m
28 lines (23 loc) · 843 Bytes
/
gen_point_clouds.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
close all;
database_path = '/home/phg/Storage/Data/InternetRecon2/%s/crop';
persons = {'Andy_Lau',...
'Benedict_Cumberbatch',...
'Bruce_Willis',...
'Donald_Trump',...
'George_W_Bush',...
'Hillary_Clinton',...
'Oprah_Winfrey',...
'Zhang_Ziyi'};
persons = {'Andy_Lau'};
%database_path = '/home/phg/Storage/Data/InternetRecon0/%s/crop';
%persons = {'yaoming'};
for j=1:length(persons)
person=persons{j};
path = sprintf(database_path, person);
all_images = read_settings(fullfile(path, 'settings.txt'));
for i=1:length(all_images)
depth_map = fullfile(path, 'SFS', sprintf('optimized_depth_map_%d.bin', i-1));
I_depth = load_depth_map(depth_map, [250, 250]);
save_point_cloud(fullfile(path, 'SFS', sprintf('optimized_point_cloud_%d.txt', i-1)), I_depth);
end
end