DetectFixations360IDTFile.m 1.1 KB

1234567891011121314151617181920212223242526272829
  1. % DetectFixations360IDTFile.m
  2. %
  3. % This function detects fixations based on the I-DT algorithm.
  4. % The result is stored as a new attribute in the output file with values of
  5. % '{unassigned, fixation}'
  6. %
  7. % input:
  8. % arffFile - file to label
  9. % outputfile - ARFF file to store detected fixations
  10. % outputAtt - attribute that holds detected fixations in the output ARFF file
  11. % typeOfMotion - 1 -> eye FOV, 2 -> eye+head
  12. % dispThres - dispersion threshold in degrees
  13. % windowDur - window duration in us
  14. function DetectFixations360IDTFile(arffFile, outputFile, outputAtt, typeOfMotion, dispThres, windowDur)
  15. if (nargin < 6)
  16. windowDur = 100000;
  17. end
  18. if (nargin < 5)
  19. dispThres = 1.5;
  20. end
  21. [data, metadata, attributes, relation, comments] = LoadArff(arffFile);
  22. res = DetectFixations360IDT(data, metadata, attributes, typeOfMotion, dispThres, windowDur);
  23. [data, attributes] = AddAttArff(data, attributes, res, outputAtt, '{unassigned,fixation}');
  24. SaveArff(outputFile, data, metadata, attributes, relation, comments);
  25. end