esdalmaijer / PyGaze

an open-source, cross-platform toolbox for minimal-effort programming of eye tracking experiments
www.pygaze.org
GNU General Public License v3.0
671 stars 211 forks source link

Saccade detection on Tobii trackers produces problems due to missing chin rest #84

Open scattenlaeufer opened 7 years ago

scattenlaeufer commented 7 years ago

If I analysed the code for Tobii eye trackers correctly, there might be a problem with the detection of saccades.

In the paper mentioned in the README.md it is stated that saccades are detected based on thresholds for the velocity and deg/s and the acceleration in deg/s², which then are converted to pixel/s and pixel/s² respectively during calibration. This is no problem, if the distance between the eyes and the display is fixed during the experiment as it's the case with eye trackers using a chin rest, but might cause problems if this distance changes. (I ignore at this point the fact that there are also slight errors with a fixed eye-screen distance due to the fact that the distance increases towards the corners of the screen, but I'm guessing that this error is negligible.)

Since at least the Tobii TX300 doesn't use a chin rest, but detects the eye position within a box roughly the same length as it's distance to the screen there might be bigger issues with a consistent detection of saccades on the front end of this box compared to the back end. Due to the fact that only the velocity and acceleration are only measured in pix and not deg, an eye movement which isn't registered as an saccade near the screen might be at higher distances.

A possible fix for this issue would be working with the gaze vector and not only the gaze point on the screen. All the necessary data to calculate the gaze vector is given in the GazeDataItem provided in the Tobii SDK and stored within the TobiiController in PyGaze. The down side of this would be of course that calculating the gaze vector would be by far more computational effort than is used by the current method.

I am not sure whether this also effects other eye trackers since I am only familiar with the Tobii TX300 and have no other trackers to look into the issue, but if there are other trackers working without any form of fixation for the participant's head, there is a high possibility that those are also effected.

It might also be the case, that I am missing something in the code, so it would be nice to get some feedback on this train of thought.

scattenlaeufer commented 7 years ago

Since we think this is a veritable problem in saccade detection on Tobii trackers it would be nice to get some feedback on this issue. It would also be nice to know, whether there is an interest to merge a reimplementation of the saccade detection into the master branch if we'd invest the work in doing it.

esdalmaijer commented 7 years ago

Sorry for the late reply; am in the final year of my PhD (aaaaah!), and December generally isn't me best month anyway :p

Thanks for the elaborate description of the issue. As you say, it's only a problem when chin rests aren't used. I don't have the time to spearhead a fix, but if you'd like to take it on, I'd be happy to help. Obviously, if you manage to solve the issue, I'd be very happy to include your code in the master branch!

hcuve commented 5 years ago

Wondering if this was ever tackled? This might be problematic as Tobi tx300 and the Tobi pro spectrum dont use chin rest @esdalmajer @scattenlaeufer

arnohakk commented 5 years ago

@hcuve: @scattenlaeufer and I never tackled this issue as Pygaze fixation detection seems to be robust enough for a freely-moving head, at least for our goals. For offline data analysis, we have implemented an R version for our upcoming paper. If you are interested, contact me via PN.

hcuve commented 5 years ago

Hi @arnohakk @scattenlaeufer

Thanks and sorry for not following up.

Would love to read the paper, is it available somewhere?

Best Helio

arnohakk commented 4 years ago

@hcuve Sorry for coming back this late. Our toolbox containing the code in currently in the review process. Are you still interested?

hcuve commented 4 years ago

hi @arnohakk , yes please! Would love to read about your method, thanks!