Tuesday, February 5, 2008

Day 3:1 - Quick fix for noisy data

Yesterday I was able to plot the recorded gaze data and visually illustrate it by drawing small rectangles where my gaze was positioned. As mentioned the gaze data was rather noisy. Upon fixating on a specific area the points would still spray out within an area about the size of a soda cap. I decided to have a better look at the calibration process. This is done in the IView program supplied by SMI. By running the process in a full size window I was able to get a better calibration, increasing the number of calibration points gives a better result.

Still the gaze data is rather noisy and it is a well known problem within the field. This has previously been solved by applying an algorithm ro smoothen the X and Y position. My initial solution is to compare the received data with the last reading. If it is within a radius of 20 pixels it will be considered to be the same spot as the previous fixation.


if (isSmoothGazeDataOn)
{
// If new gaze X point is outside plus/minus the smooth-radius, set new gaze pos.
if (newGazeX > this.gazePositionX + this.smoothRadius ||
newGazeX < this.gazePositionX - this.smoothRadius)

this.gazePositionX = newGazeX;


// If new gaze Y point is outside plus/minus the smooth-radius, set new gaze pos.
if (newGazeY > this.gazePositionY + this.smoothRadius ||
newGazeY < this.gazePositionY - this.smoothRadius)

this.gazePositionY = newGazeY;
}
else // Gaze position is equal to pure data. No filtering.
{
this.gazePositionX = newGazeX;
this.GazePositionY = newGazeY;
}
}


It is a very simple function for stabilizing the gaze data (somewhat). A solution with a buffers and a function to averaging over more readings might be better but for now this does the trick (the gaze plotter became more stable upon fixating on one specific area)

No comments: