Simple bindings for the latest Tobii Gaze SDK to Java.
- All-in-one package
- Works with (and requires) 64-bit JVMs
- Tested on Windows 8
Download the latest release of the Java Bindings.
Paste this code into your main()
:
final Configuration config = new Configuration().init();
final EyeTracker tracker = new EyeTracker(config);
final GazeListener listener = new GazeListener() {
public void gazeEvent(GazeEvent event) {
System.out.println(event.center().eyePosInBoxNorm);
}
public void apiException(APIException exception) {
System.out.println(exception);
}
};
tracker.connect().register(listener).start();
In addition, you might want to add a Thread.sleep(100000)
, to prevent the application from terminating.
-
(2013/11/12) -- Version 1.0, should work with all Tobii REX and X2 eye trackers.
-
(2013/04/15) -- Initial release, core features working.
-
Where can I find in-depth documentation?
Please see the Tobii Gaze SDK for information on function calls and variable meanings.
-
What eye trackers are supported?
- Tobii REX eye trackers
- Tobii X2-30 and X2-60 eye trackers
- Tobii X120 and TX300 eye trackers (*not tested at the moment)
-
How can I connect to a specific eye tracker?
- First make sure you get the device's address using the Eye Tracker Browser, e.g.,
TX120-203-83900184.local.
- Then pass an URL like this
"tet-tcp://TX120-203-83900184.local."
(the.
is part of the name!) to theEyeTracker
object.
- First make sure you get the device's address using the Eye Tracker Browser, e.g.,
-
How much latency does the wrapping add?
The overall added latency should be well below 1ms. However, garbage collection in the JVM might cause longer delays if an inappropriate collector is being used. In case you are developing latency-sensitive applications consult the JVM documentation.
-
Does it work with 32bit JVMs?
No. Please update to a 64bit JVM.
Read this carefully:
The actual JAR library and its sources are licensed as LGPL 2.1.
The underlying Tobii Gaze SDK .dlls are licensed according to the Tobii Gaze SDK Agreement. In particular it does not allow for developing applications that use eye tracking data for recording behavior.
- Wrapper created by Ralf Biedert
Uses code from Tobii Technology AB and Bridj.