Пример #1
0
        public List <double> speedPerFixation()
        {
            //Clone the gaze for applying fixation detection on it
            GazeData gdFixation = (GazeData)gd.Clone();

            GazeData.fixationBusher2008(gdFixation.gazes);
            List <double> speed = new List <double>();

            for (int i = 1; i < gdFixation.gazes.Count; i++)
            {
                double distX = gdFixation.gazes[i].gazeX - gdFixation.gazes[i - 1].gazeX;
                //Don't compute speed for backward
                if (distX < 0)
                {
                    continue;
                }
                double estimatedWords = distX / averageWidthWordSpace;
                double elapsedtime    = gdFixation.gazes[i].timestamp - gdFixation.gazes[i - 1].timestamp;
                speed.Add(60000 * estimatedWords / elapsedtime);
            }
            return(speed);
        }