DetectSaccades360IVTFile.m 971 B

12345678910111213141516171819202122232425
  1. % DetectSaccade360IVTFile.m
  2. %
  3. % This function uses a simple speed threshold as in I-VT to detect saccades.
  4. % The result is stored as a attribute in the output file with values of
  5. % '{unassigned, saccade}'
  6. %
  7. % input:
  8. % arffFile - file to label
  9. % outputfile - ARFF file to store detected saccades
  10. % outputAtt - attribute that holds detected saccades in the output ARFF file
  11. % typeOfMotion - 1 -> eye FOV, 2 -> eye+head
  12. % velThreshold - velocity threshold for I-Vt
  13. function DatectSaccades360IVT(arffFile, outputFile, outputAtt, typeOfMotion, velThreshold)
  14. if (nargin < 5)
  15. velThreshold = 100;
  16. end
  17. [data, metadata, attributes, relation, comments] = LoadArff(arffFile);
  18. res = DetectSaccades360IVT(data, metadata, attributes, typeOfMotion, velThreshold);
  19. [data, attributes] = AddAttArff(data, attributes, res, outputAtt, '{unassigned,saccade}');
  20. SaveArff(outputFile, data, metadata, attributes, relation, comments);
  21. end