Hi,
I am using Tobii X2-60 & T60XL. I want to export the gaze data points in real time, I don’t think it is possible with Tobii Studio software, but is it possible by using PyGaze or another API which supports Tobii X2-60 & T60XL.
Thanks
In general: yes! You can use the EyeTracker class' sample method. Minimal example:
import time
from pygaze.display import Display
from pygaze.eyetracker import EyeTracker
# Initialise a Display and an EyeTracker instance
disp = Display()
tracker = EyeTracker(disp, trackertype='tobii')
# Calibrate the eye tracker
tracker.calibrate()
# Start recording eye data
tracker.start_recording()
# Loop for ten seconds
t0 = time.time()
t1 = time.time()
while t1 - t0 < 10:
# Get a gaze position sample from the tracker
x, y = tracker.sample()
# Get the time
t1 = time.time()
# Do something with the sample
# (In this example, simply print it to the terminal)
print("Eye position: x=%d, y=%d" % (x,y))
# Stop recording eye data
tracker.stop_recording()
# Close the connection to the tracker
tracker.close()
# Close the Display
disp.close()
Please do note that I am unfamiliar with the specific Tobii system you mention, and that I do not currently have access to a Tobii tracker to debug any potential issues. (The Tobii library is somewhat experimental, and has only been tested on a TX300.)
Comments
Hi,
In general: yes! You can use the
EyeTrackerclass'samplemethod. Minimal example:Please do note that I am unfamiliar with the specific Tobii system you mention, and that I do not currently have access to a Tobii tracker to debug any potential issues. (The Tobii library is somewhat experimental, and has only been tested on a TX300.)
Cheers,
Edwin
PS: Loved you in
M*A*S*H!