-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# gazesdk # | ||
|
||
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. | ||
|
||
## Example ## | ||
|
||
The following example prints normalized screen coordinates for first 10 events. | ||
|
||
```python | ||
|
||
from gazesdk import * | ||
import threading | ||
|
||
t = Tracker() | ||
t.create(get_connected_eye_tracker()) | ||
|
||
def eventloop(tracker): | ||
tracker.run_event_loop() | ||
|
||
el = threading.Thread(target=eventloop, args=(t,)) | ||
el.start() | ||
|
||
print "Connecting..." | ||
t.connect() | ||
|
||
print "Starting..." | ||
t.start_tracking() | ||
|
||
for _ in range(20): | ||
data = t.event_queue.get() | ||
print data.left.gaze_point_on_display_normalized, data.left.gaze_point_on_display_normalized | ||
t.event_queue.task_done() | ||
|
||
print "Stopping..." | ||
t.stop_tracking() | ||
|
||
print "Disconnecting..." | ||
t.disconnect() | ||
|
||
print "Breaking event loop" | ||
t.break_event_loop() | ||
el.join() | ||
t.destroy() | ||
|
||
``` | ||
|
||
## TODO ## | ||
|
||
- [ ] Clibration functions | ||
- [ ] Raising exceptions on error codes | ||
- [ ] Internal thread running | ||
- [ ] API docs | ||
|
||
## Licence ## | ||
|
||
The MIT License (MIT) | ||
|
||
Copyright (c) 2015 balancana | ||
|
||
Please note that this software relies on proprietary library. Check Tobii's website for more details. |