With this SDK you will be able to easily find and get data from your Tobii eye tracker. If you are new to eye tracking we recommend that you spend some time exploring the content in Tobii's Learn & Support section of the Tobii Pro website . There you will find a lot of information about how eye tracking works in general and how to design studies.
In the Common concepts section of this website, you will find information about concept referenced in the SDK documentation which are common for all SDK languages. This includes, but are not limited to, things like the different coordinate systems used as well as how time stamps are defined.
Visit our download site for the Tobii Pro SDK , and download the latest version of the Tobii Pro SDK C Binding for your platform. The package includes all files you will need to develop an application that communicates with a Tobii Pro eye tracker. Extract the files and put them where you usually keep your development files.
The Tobii Pro SDK has been build using Microsoft's Windows 8.1 SDK. In the example below the tobii_research header files are assumed to be installed at the location path-to-includes and the tobii_research libraries
are assumed to be installed at the location path-to-libs. So if your project consist of a file, simple_project.c which is using the Tobii Pro SDK, then it could be compiled and linked by typing:
cl simple_project.c /Ipath-to-includes path-to-libs\tobii_research.lib
To run an application using Tobii Pro SDK, e.g the simple_project built in previous section you need to add path-to-libs as a search path for the application. One way of doing this is to add the path-to-libs to the environment variable PATH.
Visit our download site for the Tobii Pro SDK , and download the latest version of the Tobii Pro SDK C Binding for your platform. The package includes all files you will need to develop an application that communicates with a Tobii Pro eye tracker. Extract the files.
Open a terminal window where the files where extracted and type:
sudo make install
To install the 64-bit tobii_research.
Together with the header files and the shared libraries there is also a pkg-config file installed to simplify integrating Tobii Pro SDK in your project.
Typing pkg-config --cflags tobii_research
returns the compiler flags needed to compile your project with regard to tobii_research, while pkg-config --libs tobii_research
returns the linker flags needed to link your project. The pkg-config
command can be used together with gcc
, so if your project consist of a file, simple_project.c which is
using the Tobii Pro SDK, then it could be compiled and linked by typing:
gcc simple_project.c `pkg-config --cflags --libs tobii_research` -o simple_project
To run an application using Tobii Pro SDK, e.g the simple_project built in previous section type:
LD_LIBRARY_PATH=/usr/local/lib/tobii_research ./simple_project
There are other and better ways to add search paths for shared libraries then setting the LD_LIBRARY_PATH, but that is not a part of this guide's scope.
Visit our download site for the Tobii Pro SDK , and download the latest version of the Tobii Pro SDK C Binding for your platform. The package includes all files you will need to develop an application that communicates with a Tobii Pro eye tracker. Extract the files.
Open a terminal window where the files where extracted and type:
sudo make install
Together with the header files and the shared libraries there is also a pkg-config file installed to simplify integrating Tobii Pro SDK in your project.
Typing pkg-config --cflags tobii_research
returns the compiler flags needed to compile your project with regard to tobii_research, while pkg-config --libs tobii_research
returns the linker flags needed to link your project. The pkg-config
command can be used together with clang
, so if your project consist of a file, simple_project.c which is
using the Tobii Pro SDK, then it could be compiled and linked by typing:
clang simple_project.c `pkg-config --cflags --libs tobii_research` -o simple_project
To run an application using Tobii Pro SDK, e.g the simple_project built in previous section type:
DYLD_LIBRARY_PATH=/usr/local/lib/tobii_research ./simple_project
There are other and better ways to add search paths for shared libraries then setting the DYLD_LIBRARY_PATH, but that is not a part of this guide's scope.
Most eye tracking applications follow the same pattern in terms of in which order functionality is used. The order is usually as follows:
To do this with the Tobii Pro SDK is very simple:
Start with including tobii_research.h
, and use either the tobii_research_find_all_eyetrackers
function to get a list of available eye trackers, or get a TobiiResearchEyeTracker
pointer
from an address (URI) via the tobii_research_get_eyetracker
function.
The returned result from tobii_research_find_all_eyetrackers
contains pointers to instances of TobiiResearchEyeTracker
. Through those you can interact with the eye trackers.
To calibrate the eye tracker, use the functions in the tobii_research_calibration.h
header file. More information about how a calibration works can be found in the section Calibration.
When you have a TobiiResearchEyeTracker
pointer and want to subscribe to gaze data, subscribe with either function tobii_research_subscribe_to_gaze_data
. The data will be available as TobiiResearchGazeData
, via the callback registered when subscribing.