generateFolderResults

PURPOSE ^

generateFolderResults.m is a function to automatically generate the results folder where tracker's output files are stored

SYNOPSIS ^

function tmpDestFolder=generateFolderResults(rootDestFolder,videoName,feature_type)

DESCRIPTION ^

 generateFolderResults.m is a function to automatically generate the results folder where tracker's output files are stored

  GENERATEFOLDERRESULTS creates the results folder for the DS-KCF tracker
  inside the top folder specified in the string rootDestFolder. The
  generated folder name is composed by using two other strings: videoName
  that contains the sequence name that is going to be analyzed and
  feature_type string that contains the name of the feature selected for
  the DS-KCF tracker. In the case that a folder with the same name already
  exists in rootDestFolder, an incremental counter is used to avoid
  overwriting the old folder

   INPUT:
  -rootDestFolder name of the top folder where results will be saved
  -videoName name of the sequences processed by the DS-KCF tracker
  -feature_type name of the feauture used by the DS-KCF tracker

   OUTPUT
  -tmpDestFolder string containing absolute path of the results folder

  Examples:
    >> rootDestFolder='C:\myExistingResultsFolder';
    >> videoName='videoToProcess';
    >> feature_type='hog_depth';
    >> tmpDestFolder=generateFolderResults(rootDestFolder,videoName,feature_type)
       tmpDestFolder =

       C:\myExistingResultsFolder\videoToProcess_hog_depth

  University of Bristol
  Massimo Camplani and Sion Hannuna

  massimo.camplani@bristol.ac.uk
  hannuna@compsci.bristol.ac.uk

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % generateFolderResults.m is a function to automatically generate the results folder where tracker's output files are stored
0002 %
0003 %  GENERATEFOLDERRESULTS creates the results folder for the DS-KCF tracker
0004 %  inside the top folder specified in the string rootDestFolder. The
0005 %  generated folder name is composed by using two other strings: videoName
0006 %  that contains the sequence name that is going to be analyzed and
0007 %  feature_type string that contains the name of the feature selected for
0008 %  the DS-KCF tracker. In the case that a folder with the same name already
0009 %  exists in rootDestFolder, an incremental counter is used to avoid
0010 %  overwriting the old folder
0011 %
0012 %   INPUT:
0013 %  -rootDestFolder name of the top folder where results will be saved
0014 %  -videoName name of the sequences processed by the DS-KCF tracker
0015 %  -feature_type name of the feauture used by the DS-KCF tracker
0016 %
0017 %   OUTPUT
0018 %  -tmpDestFolder string containing absolute path of the results folder
0019 %
0020 %  Examples:
0021 %    >> rootDestFolder='C:\myExistingResultsFolder';
0022 %    >> videoName='videoToProcess';
0023 %    >> feature_type='hog_depth';
0024 %    >> tmpDestFolder=generateFolderResults(rootDestFolder,videoName,feature_type)
0025 %       tmpDestFolder =
0026 %
0027 %       C:\myExistingResultsFolder\videoToProcess_hog_depth
0028 %
0029 %  University of Bristol
0030 %  Massimo Camplani and Sion Hannuna
0031 %
0032 %  massimo.camplani@bristol.ac.uk
0033 %  hannuna@compsci.bristol.ac.uk
0034 
0035 function tmpDestFolder=generateFolderResults(rootDestFolder,videoName,feature_type)
0036 
0037 tmpDestFolderAbsolute=[rootDestFolder '/' videoName '_' feature_type];
0038 tmpDestFolder=[videoName '/' feature_type];
0039 
0040 existingDir=exist(tmpDestFolderAbsolute,'dir');
0041 
0042 if(existingDir==false)
0043     
0044     tmpDestFolder=tmpDestFolderAbsolute;
0045 else
0046     %take the number of existing folder...
0047     numDir=length(dir([tmpDestFolderAbsolute '*']));
0048     numDir=numDir+1;
0049     tmpDestFolderAbsolute=[rootDestFolder '/' videoName '_' feature_type num2str(numDir)];
0050     tmpDestFolder=tmpDestFolderAbsolute;
0051 end
0052 
0053 mkdir(tmpDestFolder);

Generated on Thu 24-Nov-2016 18:03:21 by m2html © 2005