Gaze data logging

Note: you are currently viewing documentation for a beta or an older version of Varjo

In Varjo Base there is a feature for logging gaze data. You can record what the user sees together with the eye tracking data. The eye tracking data will be recorded in the form of .csv file and can later be visualized on top of the video recording or analyzed separately.

To record the eye tracking data, first you need to run the eye calibration, otherwise the option will not be available.

Open the Analytics window and click the Eye tracking button on the bottom tool bar. Now you will see the Eye tracking menu on the left side. The menu will be inactive if you haven’t calibrated eye tracking. Note that every time you take off the headset you need to recalibrate again.

When your eye tracking is calibrated, the menu becomes active, and you have two options. First option allows you to visualize the eye tracking dot in the mirror (it will not be visible inside the headset). It can be used to check in real time where the user is looking at. The second option will record eye tracking data that can be used later for analysis or visualization. When the logging option is set to On you can press the screen recording button on the bottom to record both video and eye tracking data. Note that the Screen recording button icon would have an eye icon in the corner indicating that eye data will be logged.

After you finished recording, you can find both video file and eye tracking log file in the Videos/Varjo folder. Both files have identical names, but the video file will have a .avi extension and the gaze data will have a .csv extension.

Gaze data format

CSV contains the following data per sample:

  • Generic gaze data, which is also available from Varjo APIs. These are described in developer docs and below.
  • Video capture related data:
    1. Projected X-Y coordinates, which can be used to directly map the gaze coordinates to video pixel coordinates.
    2. Timestamp relative to start of the video.

Generic gaze data

raw_timestamp

relative_to_unix_epoch_timestamp

  • The time-of-day timestamp of when the data was recorded as Unix Time in nanoseconds. Its value is dependent on the time-of-day clock adjustment of the operating system, however, it is not dependent on daylight saving and time zone settings.

focus_distance

  • The distance between the eye and the focus point. It is a value between 0 and 2 meters.

frame_number

  • A unique identifier of the frame when the data was recorded.

stability

  • A value between 0.0 and 1.0 specifying the stability of the user’s focus. 0.0 means not stable and 1.0 means stable.

status

  • A value representing the status of eye tracking in the Varjo headsets, where:
    0 – data is not available, user is not wearing the device or eyes cannot be found
    1 – user is wearing the device, but gaze tracking is being calibrated
    2 – data is valid
    Starting from Varjo Base 3.7, rows with status 0 are included in the CSV, because the eye measurement data is still usable.

gaze_forward_x
gaze_forward_y
gaze_forward_z
gaze_origin_x
gaze_origin_y
gaze_origin_z

  • The data contains information about the eye position coordinates origin (x, y, z) and the direction of the vector forward (x, y, z). Information about the gaze is presented in the left-hand coordinate system and is relative to the head pose. The validity of the data is given by the status field.

left_forward_x
left_forward_y
left_forward_z
left_origin_x
left_origin_y
left_origin_z

  • Same information about vector and position as above, but only for the left eye.

left_pupil_size

  • Deprecated. For new development use left_pupil_diameter_in_mm.
  • The value for the size of the pupil between 0 and 1 calculated according to the pupil size range detected by the Varjo headset.

left_status

  • A value for left eye where:
    0 – eye is not tracked and not visible (e.g. eye is shut)
    1 – eye is visible but not reliably tracked (e.g. saccade or blink)
    2 – eye is tracked but quality compromised (e.g. headset has moved after calibration)
    3 – eye is tracked

right_forward_x
right_forward_y
right_forward_z
right_origin_x
right_origin_y
right_origin_z

  • Same information about vector and position as above, but only for the right eye.

right_pupil_size

  • Deprecated. For new development use right_pupil_diameter_in_mm.
  • The value for the size of the pupil between 0 and 1 calculated according to the pupil size range detected by the Varjo headset.

right_status

  • A value for right eye where:
    0 – eye is not tracked and not visible (e.g. eye is shut)
    1 – eye is visible but not reliably tracked (e.g. saccade or blink)
    2 – eye is tracked but quality compromised (e.g. headset has moved after calibration)
    3 – eye is tracked

relative_to_video_first_frame_timestamp

  • Timestamp relative to the start of the video.

left_projected_x
left_projected_y

  • Left eye gaze vector projected on the video showing the left eye image. Normalized coordinates [-1, 1].

gaze_projected_to_left_view_x
gaze_projected_to_left_view_y

  • Combined (left+right) eye gaze vector projected on the video showing the left eye image. Normalized coordinates [-1, 1].

right_projected_x
right_projected_y

  • Right eye gaze vector projected on the video showing the right eye image. Normalized coordinates [-1, 1].

gaze_projected_to_right_view_x
gaze_projected_to_right_view_y

  • Combined (left+right) eye gaze vector projected on the video showing the right eye image. Normalized coordinates [-1, 1].

Eye measurement data

inter_pupillary_distance_in_mm

  • Estimate of distance between pupil centers in millimeters.

left_iris_diameter_in_mm
right_iris_diameter_in_mm

  • Estimate of iris diameter in millimeters.

left_pupil_diameter_in_mm
right_pupil_diameter_in_mm

  • Estimate of pupil diameter in millimeters.

left_pupil_iris_diameter_ratio
right_pupil_iris_diameter_ratio

  • Ratio of pupil diameter to iris diameter (i.e. left_pupil_diameter_in_mm / left_iris_diameter_in_mm). In range [0..1].

left_eye_openness
right_eye_openness

  • Estimate of eye openness ratio. Value 1.0 corresponds to a fully open eye, 0.0 to a fully closed eye.