2017-01-04 23:32:38 +01:00
|
|
|
function [output_dir] = run_bu_experiment(bu_dir, verbose, varargin)
|
2016-04-28 21:40:36 +02:00
|
|
|
|
2017-01-04 23:32:38 +01:00
|
|
|
if(isunix)
|
|
|
|
executable = '"../../build/bin/FeatureExtraction"';
|
|
|
|
else
|
|
|
|
executable = '"../../x64/Release/FeatureExtraction.exe"';
|
2016-04-28 21:40:36 +02:00
|
|
|
end
|
|
|
|
|
2017-01-04 23:32:38 +01:00
|
|
|
output_dir = 'experiments/bu_out/';
|
|
|
|
|
2016-04-28 21:40:36 +02:00
|
|
|
buFiles = dir([bu_dir '*.avi']);
|
|
|
|
|
2017-11-10 21:40:59 +01:00
|
|
|
% Only outputing the pose (-pose)
|
|
|
|
command = sprintf('%s -inroot "%s" -out_dir "%s" -fx 500 -fy 500 -cx 160 -cy 120 -pose -vis-track ', executable, bu_dir, output_dir);
|
2016-04-28 21:40:36 +02:00
|
|
|
|
2017-11-10 21:40:59 +01:00
|
|
|
for i=1:numel(buFiles)
|
|
|
|
inputFile = [buFiles(i).name];
|
|
|
|
command = cat(2, command, sprintf(' -f "%s" ', inputFile));
|
|
|
|
end
|
2016-04-28 21:40:36 +02:00
|
|
|
|
2017-11-05 11:30:40 +01:00
|
|
|
|
2017-11-10 21:40:59 +01:00
|
|
|
if(verbose)
|
|
|
|
command = cat(2, command, [' -tracked ' outputVideo]);
|
|
|
|
end
|
2016-04-28 21:40:36 +02:00
|
|
|
|
2017-11-10 21:40:59 +01:00
|
|
|
if(any(strcmp('model', varargin)))
|
|
|
|
command = cat(2, command, [' -mloc "', varargin{find(strcmp('model', varargin))+1}, '"']);
|
|
|
|
end
|
2016-04-28 21:40:36 +02:00
|
|
|
|
2017-11-10 21:40:59 +01:00
|
|
|
if(isunix)
|
|
|
|
unix(command, '-echo')
|
|
|
|
else
|
|
|
|
dos(command);
|
2016-04-28 21:40:36 +02:00
|
|
|
end
|
2017-11-10 21:40:59 +01:00
|
|
|
|
2016-04-28 21:40:36 +02:00
|
|
|
end
|