Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

[open] Live exporting of Eye Gaze points from Tobii X2-60/T60XL

edited June 2016 in PyGaze

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.


  • edited June 2016


    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
    # Start recording eye data
    # 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
    # Close the connection to the tracker
    # Close the Display

    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.)



    PS: Loved you in M*A*S*H! ;)

Sign In or Register to comment.