Plugin for Pupil Capture that publishes realtime gaze data using the lab streaming layer framework.
- Install
pylsl
- Copy or symlink
pylsl
with all its content to the plugin directory. - Copy
pupil_lsl_relay.py
to the plugin directory.
- Start Pupil Capture.
- Open the Pupil LSL Relay plugin.
- Now the LSL outlet is ready to provide data to other inlets in the network.
The plugin opens a single outlet named pupil_capture
that follows the Gaze Meta Data format.
See our pupil-helpers for examples on how to record and visualize the published data.
The published LSL data is simply a flattened version (see extract_*()
functions in pupil_lsl_relay.py
) of the original Pupil gaze data stream. The stream's channels will be filled with best effort, i.e. if there is a monocular gaze datum the values for the opposite eye will be set to NaN
. The actual pairing of pupil data to binocular gaze data happens in Capture and is not a LSL specific behaviour. Therefore, it is possible to apply the same flattening code to offline calibrated gaze data and reproduce the stream published by the LSL outlet.
'confidence': Normalized (0-1) confidence.
'norm_pos_x', 'norm_pos_y': Normalized (0-1) coordinates on the screen.
'gaze_point_3d_x', 'gaze_point_3d_y', 'gaze_point_3d_z': World coordinates in mm
'eye_centerright_3d_x' ... (for right/left eyes, for x/y/z): Position of eye center in world coordinates in mm.
'gaze_normalright_x' (right/left, x/y/z): End point of vector from eye center (I think).
'diameterright_2d' (right/left): Pupil diameter in pixels
'diameterright_3d' (right/left): Pupil diameter in mm
The Pupil LSL Relay
plugin adjusts Capture's timebase to synchronize Capture's own clock with the pylsl.local_clock()
. This allows the recording of native Capture timestamps and removes the necessity of manually synchronize timestamps after the effect.
Warning: The time synchronization will potentially break if other time alternating actors (e.g. the Time Sync
plugin or hmd-eyes
) are active.