Repository navigation
Expand file tree
/
Copy pathtmp.m
More file actions
73 lines (53 loc) · 2.31 KB
/
Copy pathtmp.m
File metadata and controls
73 lines (53 loc) · 2.31 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
fclose('all'); close all hidden; clc; clear;
%% initialize matlabpool
% if 0 == matlabpool('size'), matlabpool(2); end
% fprintf('\nnumber of workers: %d\n', matlabpool('size'));
%% initialize parameters
% opts.paths.root = 'c:\Users\xwu\Documents\FaceReco\software\partial_scan\uw_data\uw_obj_1\';
opts.paths.root = 'c:\Users\xwu\Documents\FaceReco\software\partial_scan\mpi_data\kinect_obj\';
% opts.paths.root = 'e:\Workstation\DataCenter\uw_data\uw_obj_1\';
% opts.paths.root = '/HPS/rtface/work/part_scan/uw_data/object_collection\';
% opts.paths.root = '/HPS/rtface/work/part_scan/uw_data/object_collection_1\';
% opts.paths.root = '/HPS/rtface/work/part_scan/uw_data/object_collection_2\';
opts.paths.data = [opts.paths.root '\data\'];
opts.paths.in = [opts.paths.root '\input\'];
opts.paths.out = [opts.paths.root '\output\'];
opts.paths.root(opts.paths.root == '\') = '/';
opts.paths.data(opts.paths.data == '\') = '/';
opts.paths.in(opts.paths.in == '\') = '/';
opts.paths.out(opts.paths.out == '\') = '/';
if ~ exist(opts.paths.out, 'dir'), mkdir(opts.paths.out); end
%% diary mode
diary(sprintf('%s/diary_%s', opts.paths.out, date));
diary on;
%% local startup
lmup;
%% flag for rebuid
force_redo = false; % true; false;
%% create data object
opts.datao.step = 2;
if ~exist(sprintf('%s/cws.mat', opts.paths.out), 'file') || force_redo
uw_obj = FolderProc.UWDataProc(opts);
save(sprintf('%s/cws.mat', opts.paths.out), '-mat', '-v7.3', 'uw_obj');
force_redo = true;
uw_obj.Im2PC();
else
load(sprintf('%s/cws.mat', opts.paths.out), '-mat');
fprintf('\ndate set object loaded\n');
end
%% extract features
opts.fextr.step = 2;
if ~exist(sprintf('%s/cws_fe.mat', opts.paths.out), 'file') || force_redo
fextor = Feature.Proxy(uw_obj, opts.fextr);
save(sprintf('%s/cws_fe.mat', opts.paths.out), '-mat', '-v7.3', 'fextor');
force_redo = true;
else
load(sprintf('%s/cws_fe.mat', opts.paths.out), '-mat');
fprintf('\nfeature extractor loaded\n');
end
%% sequential registration
opts.rotreg.seqsn = 1;
opts.rotreg.bin_w = false; % true; false;
tic; fprintf('%s >> exporting registration files ...\n', datestr(now));
Registration.RotReg(uw_obj, fextor, opts.rotreg);
fprintf('%s >> execution time: %.2f\n\n', datestr(now), toc);