Gaze data logging
Note: you are currently viewing documentation for a beta or an older version of Varjo
VarjoBase 2.3 has introduced new feature for logging gaze data. Now you can record what user sees together with eye tracking data. Eye tracking data will be recorded in the form of .csv file and later could be visualized on top of the video recording or analyzed separately.
In order to record eye tracking data, first you would need to run eye calibration, otherwise option would not be available.
Open Analytics window and click Eye tracking button on the bottom tool bar. Now you will see Eye tracking menu on the left side. 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 eye tracking dot in the mirror (it will not be visible inside headset). It can be used to check in real time where person is looking at. Second option will record eye tracking data, that could be used later for analysis or visualization. When 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 “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 would have identical name, except video file has .avi extension and gaze data has .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:
- Projected X-Y coordinates, which can be used to directly map the gaze coordinates to video pixel coordinates.
- Timestamp relative to start of the video.
Generic gaze data
raw_timestamp
- The timestamp of when the data was recorded in nanoseconds.
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
gaze_forward_x
gaze_forward_y
gaze_forward_z
gaze_origin_x
gaze_origin_y
gaze_origin_z
- Data contains information about eye position coordinates origin (x, y, z) and the direction of vector forward (x, y, z). varjo_ray info is recorded for left eye (leftEye), right eye (rightEye), and combined value (gaze). Information about gaze is presented in the left-hand coordinate system and is relative to the head pose.
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
- 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
- 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
Video capture related data
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].