This is a Python 3 x64 version of the code from balancana. It also adds information for custom compilation.
Python language bindings implemented in Cython for Tobii GazeSDK C API.
This is a work in progress. Backwards incompatible changes are possible in the near future. Currently only basic tracking functionality is supported, See TODO below for planned changes.
Note that use of this software is not officially supported by Tobii.
The following example prints normalized screen coordinates for first 20 events.
from gazesdk import *
url = get_connected_eye_tracker()
t = Tracker(url)
t.run_event_loop()
t.connect()
t.start_tracking()
for _ in range(20):
data = t.event_queue.get()
print (data.left.gaze_point_on_display_normalized,
data.right.gaze_point_on_display_normalized)
t.event_queue.task_done()
t.stop_tracking()
t.disconnect()
t.break_event_loop()
Dependencies: Python 3.x 64 bit, MSVS 2013 (or maybe other as well?)
- Download Tobii Gaze SDK and extract it to
tobii
. Version 2.0 was tested. - Copy "TobiiGazeCore64.dll" to the root
- Run
python setup.py build_ext --inplace --compiler=msvc
- Test with
python test.py
- Calibration functions
- Raising exceptions on error codes
- Internal thread running
- API docs
The MIT License (MIT)
Copyright (c) 2015 balancana / erkil1452
Please note that this software relies on proprietary library. Check Tobii's website for more details.