Notes on Eye-tracking setup

back to Eye-tracking setup

 

1: Note About Alignment of EyeLink and VNC Screens
Placement of the gaze data over the VNC playback requires reproducing the alignment of the Eyelink and VNC screens at playback time. The simplest solution is running both fullscreen during recording. An alternative would be to perform some gaze calibration of VNC to identify the upper left and lower right of the VNC screen in gaze coordinates. An X application which fills the VNC screen, displaying markers at opposite corners (maybe markers at four corners to allow for correction any trapezoidal distortion between EyeLink and VNC screens), and a button box to signal Eyelink to record the current gaze. We might want to do this even if eyelink
and VNC are full screen, to improve the placement of the gaze during VNC playback.

Alignment hasn't been as good as I expected. Often off by 1/2" to 1". I suspect most of that is due to the head mount slipping. If you want to experiment with the tightness of the head mount, try running the Eyedata experiment available in the Eyelink Experiment Kit folder. It displays the location of the gaze on the screen in real time.
Compare the accuracy of the gaze indicator before and after raising your eyebrows, opening your mouth, or moving your head slightly. The only solution is to tighten the head mount ... ouch!

2: Note on clock offset
The offset is the difference between the real time clocks in seconds. The offset drifts. Some of the drift is due to the lack of real time resolution of Win98, 1/18 of a second, about 55 milliseconds. Almost all of the drift is due to Win98. If you compare the LM to a campus time standard, you'll see an offset of a couple of milliseconds, with a drift of a fraction of a millisecond.

ntpdate -q ntp

3: Note on background-vnc
background-vnc is a modified version of the background.exe example program. It's available on the desktop.
The modification consists of four lines:

#include <sys/timeb.h>
struct _timeb timeb;
_ftime(&timeb);
eyemsg_printf("REALTIME %d %d", timeb.time, timeb.millitm);

Since the gaze data timestamps are relative to the start of eyelink on the OM, We needed a way to relate them to real time. The modification adds a line to the gaze data containing the real time. Since that line is timestamped too, we can relate the timestamp to real time. This assumes the SM clock is accurate. (See above about real time clock accuracy.)

4:Note for Calibration and Validation
If you have trouble starting either after pressing "Enter" on the OM it may be due to premature eye-movement by the subject. The subject should fixate on the center of the SM screen before beginning either step. On the bottom of the OM screen there is a "Status" measure, which indicates the presence of eye-movement by the subject. A quirk of the system is that sometimes it can be temperamental if the Status is not "Stable" before starting Calibration and/or Validation.

 

Summary of the Programs

vncviewer

Modified version to record and playback vnc, and to overlay gaze data if it is available.

background-vnc

Modified version of background.exe example program to include real time for relating timestamps to real time.

checkvnc

sanity check a vnc record file. If you need to parse
a vnc record file, take a look at fbsnxt().nxt().nxt().nxt().

gaze.awk

convert .asc file to simpler format expected by makegaze.

makegaze

convert the ascii gazedata to binary format for faster parsing during playback.

checkgaze

sanity check a binary gaze data file.

The format of the vnc record file is:

* MODIFIED TO INCLUDE STARTTIME
* The FBS (framebuffer stream) file format is this:
*
* <capture file> ::- <version><realtime><realmsec><data>
* <realtime> ::- 32-bit number, seconds since Jan 1 1970, big-endian
* <realmsec> ::- 32-bit number, milliseconds part of realtime, big-endian
* <version> ::- 'FBS 001.000\n'
* <data> ::- <byte-count><raw-data><byte-count><timestamp><data>
* | <byte-count><raw-data><byte-count><timestamp>
* <byte-count> ::- 32-bit number of bytes, big-endian
* <raw-data> ::- data received at timestamp <timestamp>, which is
* <byte-count> bytes in length, padded to multiple
* of 32-bits
* <timestamp> ::- 32-bit number of milliseconds since beginning of
* capture, big-endian
*
* <byte-count> occurs before and after <raw-data> to permit playing backwards

If you need to parse a VNC record file, take a look at checkvnc.c. It parses the file to the point of recognizing the type of the rectangle. Then look at HandleRFBServerMessage() in vnc_unixsrc/vncviewer/rfbproto.c. That is the function which parses the headers of the rectangle updates. Finally look at vnc_unixsrc/vncviewer/{corre,hextile,rre}.c. Those contain the functions which parse and unencode the rectangles. vnc_unixsrc/include/rfbproto.h contains the definitions of the structures used for parsing.

The format of the binary gaze data file is:

* Gaze file format
* <gaze file> ::- <timestamp><realtime><realmsec><width><height><data>
* <data> ::- <timestamp><x><y><data>
* | <timestamp><x><y>
* <realtime> ::- 32-bit number, seconds since Jan 1 1970, big-endian
* <realmsec> ::- 32-bit number, milliseconds part of realtime, big-endian
* <width> ::- 16-bit number, screen width, big-endian
* <height> ::- 16-bit number, screen height, big-endian
* <timestamp> ::- 32-bit number of milliseconds since beginning of
* capture, big-endian
* <x> ::- 16-bit number, big-endian
* <y> ::- 16-bit number, big-endian

The source for the vncviewer, checkvnc, gaze.awk, makegaze, and checkgaze are available using CVS. From any linux machine in the DCOG-HCI:

cvs login
cvs checkout vnc_unixsrc
cvs logout

This will create a vnc_unixsrc directory containing the source for the current versions. If you want to see what changes I made to vnc, then

cvs diff -r start

will show diff's of the files I've changed.

Ron Stanonik
Thu Nov 30 11:31:36 PST 2000 (updated August 2002)

 

Facilities Feedback Site Map contact Academic Courses Directions About Us Publications Projects People Home