DetectSaccades360FileRegex.m 1.1 KB

12345678910111213141516171819202122232425262728
  1. % DetectSaccades360FileRegex.m
  2. %
  3. % This function calls the saccades detector of the Dorr et al. 2010 for the provided
  4. % files in the regular expression
  5. %
  6. % input:
  7. % regex - regular expression to ARFF files
  8. % outDir - output directory
  9. % outputAtt - attribute that holds detected fixations in the output ARFF file
  10. % typeOfMotion - 1 -> eye FOV, 2 -> eye+head
  11. % paramfile - file containing saccade detection parameters
  12. %
  13. % ex. DetectSaccades360FileRegex('/mnt/syno8/data/VideoGaze360/gaze/labelled_ioannis/*.arff', '/mnt/scratch/VideoGaze360_buffer/labelled_files_algorithm/', 'saccades', 1, 'params_saccades_fov.txt')
  14. function DetectSaccades360FileRegex(regex, outDir, outputAtt, typeOfMotion, paramfile)
  15. filelist = glob(regex);
  16. for i=1:size(filelist,1)
  17. filename = filelist{i,1};
  18. disp(filename);
  19. [path, name, ext] = fileparts(filename);
  20. outFile = fullfile(outDir, [name ext]);
  21. DetectSaccades360File(filename, outFile, outputAtt, typeOfMotion, paramfile);
  22. end
  23. end