function expdirs = setUpDir(rootdir,varargin)

[ips,doforce,annotate,features,dosoftlink,frontside,rotatesideview,rotatefrontview] = ...
  myparse(varargin,...
  'ips',[],...
  'doforce',false,...
  'annotate',true,...
  'features',true,...
  'dosoftlink',false,...
  'frontside',false,...
  'rotatesideview',0,...
  'rotatefrontview',0);

if frontside
  createDirFcn = @makeMoviesFrontSide;
else
  createDirFcn = @makeMovies;
end

fprintf('Creating JAABA directories within root directory %s...\n',rootdir);
expdirs = createDirFcn(rootdir,'doforce',doforce,'dosoftlink',dosoftlink,...
  'rotatefrontview',rotatefrontview,'rotatesideview',rotatesideview);

if annotate
  fprintf('Annotate interest points...\n');
  annotateAllDirs(rootdir,'ips',ips,'doforce',doforce,'frontside',frontside);
end

if features
  fprintf('Generating spatiotemporal features...\n');
  genAllFeatures(rootdir,'doforce',doforce,'frontside',frontside);  
end