An OSC wrapper for the Tobii Eye Tracker 4C, written in openFrameworks with the ofxOsc and ofxTobiiEyeX addons.
Stream eye position data to programs running on different machines on your network.
PS: you can even use this project to send gaze data to the browser; check out all of the included receivers
- Tobii Eye Tracker 4C
- Tobii Eye Tracking Core Software (tested with v2.16.5)
- Windows 10
Ensure the Tobii Core software has been installed and configured. Turn it on and calibrate through Tobii's interface.
Download the pre-built zipped executable, gazeOSC_release_v1.0.zip
from the releases page. Unzip the folder, then run the application (gazeOSC.exe).
Press f to toggle fullscreen. The program will detect eye location regardless of if it's in fullscreen mode.
There are three categories of data that you can send from GazeOSC.
- Eye position data. (Green circles in GazeOSC.) This is the location of your eyes relative to the screen. There are X, Y, and Z coordinates for left and right eyes. Note that sometimes one or the other eye may not be detected, like when they're closed or you are looking to the side. In this case, the program sends an X, Y, and Z of -1 for that eye.
/eye/left/x
/eye/left/y
/eye/left/z
/eye/right/x
/eye/right/y
/eye/right/z
- Gaze data. (White circle in GazeOSC.) The estimation of where you're looking on the screen, as an X/Y coordinate. This stream includes movements between areas you fixate on.
/gaze/x
/gaze/y
- Fixation data. (Red circle in GazeOSC.) The estimation of where you're fixating on the screen, as an X/Y coordinate. This stream is just areas that you fixate on, and does not include movements between points.
/fixation/x
/fixation/y
Set the host and port number for the OSC stream. Hit enter/return or r to update the changes you make.
By default, all X and Y coordinates are relative to the screen that the eye tracker is running on. You can transform the coordinates so they're relative to the size of your receiver's screen with these options. Change the height and width, and ensure Transform Coordinates
is checked. Hit enter/return or r to update the changes you make.
To edit the GazeOSC source code, you'll need Visual Studio 2017 on a Windows machine.
- Install the ofxTobiiEyeX extension to your openFrameworks directory.
- Copy
[youOpenFrameworksDir]/addons/ofxTobiiEyeX/libs/TobiiEyeXSdk/lib/x64/Tobii.EyeX.Client.dll
togazeOSC/bin/
. - Set the build settings to
Debug
andx64
. - In your Visual Studio solution explorer, right click on
gazeOSC
and go to Properties > Configuration Properties > Linker > General > Additional Library Directories > Add, then add two lines:
[youOpenFrameworksDir]\addons\ofxTobiiEyeX\libs\TobiiEyeXSdk\include
[youOpenFrameworksDir]\addons\ofxTobiiEyeX\libs\TobiiEyeXSdk\lib\x64
Now you should be able to build and run the program.