2017-10-21 13:15:22 +02:00
|
|
|
function [output_dir] = run_ict_experiment(rootDir, ictDir, verbose, varargin)
|
2016-04-28 21:40:36 +02:00
|
|
|
%EVALUATEICTDATABASE Summary of this function goes here
|
|
|
|
% Detailed explanation goes here
|
|
|
|
|
2017-01-04 23:32:38 +01:00
|
|
|
if(isunix)
|
|
|
|
executable = '"../../build/bin/FeatureExtraction"';
|
|
|
|
else
|
|
|
|
executable = '"../../x64/Release/FeatureExtraction.exe"';
|
|
|
|
end
|
2016-04-28 21:40:36 +02:00
|
|
|
|
2017-01-04 23:32:38 +01:00
|
|
|
output_dir = 'experiments/ict_out';
|
2016-04-28 21:40:36 +02:00
|
|
|
|
|
|
|
dbSeqDir = dir([rootDir ictDir]);
|
|
|
|
|
2017-01-04 23:32:38 +01:00
|
|
|
output_dir = cat(2, output_dir, '/');
|
2016-04-28 21:40:36 +02:00
|
|
|
|
|
|
|
numTogether = 10;
|
|
|
|
|
|
|
|
for i=3:numTogether:numel(dbSeqDir)
|
|
|
|
|
2017-11-05 11:30:40 +01:00
|
|
|
command = [executable ' -fx 535 -fy 536 -cx 327 -cy 241 -pose -vis-track '];
|
2016-04-28 21:40:36 +02:00
|
|
|
|
2017-01-04 23:32:38 +01:00
|
|
|
command = cat(2, command, [' -inroot ' '"' rootDir '/"']);
|
2016-04-28 21:40:36 +02:00
|
|
|
|
|
|
|
% deal with edge cases
|
|
|
|
if(numTogether + i > numel(dbSeqDir))
|
|
|
|
numTogether = numel(dbSeqDir) - i + 1;
|
|
|
|
end
|
|
|
|
|
|
|
|
for n=0:numTogether-1
|
|
|
|
|
|
|
|
inputFile = [ictDir dbSeqDir(i+n).name '/colour undist.avi'];
|
|
|
|
|
2017-11-07 22:21:14 +01:00
|
|
|
command = cat(2, command, [' -f "' inputFile '" -of "' output_dir '" ']);
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
if(verbose)
|
|
|
|
command = cat(2, command, [' -tracked ' outputVideo]);
|
2016-04-28 21:40:36 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
if(any(strcmp('model', varargin)))
|
|
|
|
command = cat(2, command, [' -mloc "', varargin{find(strcmp('model', varargin))+1}, '"']);
|
|
|
|
end
|
|
|
|
|
2017-01-04 23:32:38 +01:00
|
|
|
if(isunix)
|
|
|
|
unix(command, '-echo')
|
|
|
|
else
|
|
|
|
dos(command);
|
|
|
|
end
|
2016-04-28 21:40:36 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|