Thursday, August 5, 2010

Trying to understand the smoothing algorithm from EyeWriter

The algorithm looks very simple:
There is one parameter, which controlls the intensity of the smoothin effect.

The formula is structured like this

NewCursorPosition =
       SmoothingFactor * OldCursorPosition
      + (1-SmoothingFactor) * ActualGazePosition

Code from testApp.cpp Line 62
   eyeSmoothed.x = CM.smoothing * eyeSmoothed.x + (1-CM.smoothing) * screenPoint.x;

One example for this:

NewPos = 0,97 * 487 + (1-0,97) * 705
              = 472 + 21
              = 493


The difference between OldPos and New Pos is 493-487 = 5px. This means, that the cursos slowly adopts to the actual gaze position without large jumps..
Increasing the Smoothing Factor leads to a much slower moving of the cursor, decreasing it, results in an abrupt jumping of the cursor, which gives it less stability.

From a first impression, the GT algorithm does not work as good as this simple and lean EyeWriter algorithm, AND uses a much more complicated logic. Therefore, I probably could implement this very simple algorithm instead.

However, I need to understand the GT algorithm first in order to decide.

1 comment:

  1. For best results try to seperate fixations and saccades so that smoothing is only applied on fixations. Typically a moving window is used where velocity and direction from the last X samples are used.

    /Martin

    Many papers out there:

    http://www.humlab.lu.se/www-transfer/research/publications/researchpapers/nyst09_BRM_09.pdf

    http://app.psychonomic-journals.org/content/71/4/881.full.pdf

    Dario D. Salvucci, Joseph H. Goldberg (2000) Identifying fixations and saccades in eye-tracking protocols. Proc. Symposium on Eye Tracking Research & Applications (ETRA 2000), Palm Beach Gardens, FL, 71-78. ACM Press: New York.

    ReplyDelete