Processing Easy Eye Tracker Plugin (PEEP)

"The probably easiest way on earth to develop stunningly looking eye tracking applications (and one of our most eye-appealing by-products we've created so far ... ;-)"




(v1.4.1)



Screenshots

In here you can find adaptions of three examples that we modified to use the gaze (or head position) instead of the mouse. The left image depicts the adapted CubicGrid demo, you can highlight the cubes with your eyes in it. The second image is the Esfera demo, using the eye tracker's head tracking ability to 'look around' the sphere. The third one is a modified Spot example, drawing circles along your gaze path.


      

Adapting these demos is really easy. All you have to do is to setup the eye tracking device (two lines of code), replace every occurrence of mouseX/Y with device.x/y respectively (or, in the case you want to use raw data, with device.eyes.rawX/Y) and fine-tune the result. Just download the examples and have a look!

Note: If you created something cool using this plugin, please send us screenshots! (or screencasts, or videos, or code, or ...)



Release Notes

Version 1.4.2 (beta) - Added API to receive last event & compatibility with Processing 1.5.1
Version 1.4.1 (6. Sep. 2011) - Added Precision API.
Version 1.3 (20. Sep. 2010) - Bug fixes.
Version 1.2 (13. Jul. 2010) - Joint release of PEEP and the rest of the framework.
Version 1.1 (22. Feb. 2010, updated) - First release. Windows only. Tested on a Tobii 1750 and x120. Initial version of the simulator included.



Requirements



Code Example

>

Below you find a complete example of how to use the eye tracker in Processing. It should compile and run just fine (even though we have to admit it won't look very beautiful).

import eyetracking.*;

EyeTrackingDevice device;

void setup() {
    device = EyeTrackingDevice.open(this);
}


void draw() {
    ellipse(device.x, device.y, 10, 10);
}

Also have a look at the tutorial video on the right (and I recommend to watch it on youtube to see a larger version).



Documentation & API

The plugins provides you with eye and head coordinates of the user, as seen by the eye tracker (the simulator only generates eye movement, head movement will be implemented later). It consists of two parts, the core library and an application called tracking server. More documentation can be found here.

The internal API can be used like this:

// a boolean, true if the user is looking, false if not
device.isLooking;

// current fixation in window coordinates
device.x;
device.y;

// current raw gaze data in window coordinates
device.eyes.rawX;
device.eyes.rawY;

// current head position, ranges from 0.0 to 1.0
device.head.x;
device.head.y;
device.head.z;

// Prints the current status of the device.
device.debug()

// Obtains precision data (1.4.1).
device.precisionData()

// Gets last event (1.4.2, may be null).
device.lastEvent()



Troubleshooting / Help

As this is the first release of the Processing plugin there are very likely some bugs in it. In case you encounter any, please write us a mail with some details. We're eager to hear how the plugin works for you and how you like it. In case you created something cool, we'd like to see it as well, of course.

In addition, you can also put a debugging statement into the draw() loop (or any other loop). It should print the current status and often also the cause of trouble on the console. Please do *not* put it outside a loop, like in setup(), as its output changes over time (the device is initialized in the background). This initialization phase takes ~5-10 seconds.

void draw() {
   device.debug()
}



Known Problems / FAQ

The FAQ has moved here.



Supported Trackers / Backends

The following devices are known to work and have been tested at our lab:

  • Tobii 1750 series
  • Tobii x120 series
  • Mouse-driven simulator backend



Credits

If you use PEEP to develop something, please mention or link the project where appropriate (even though we won't bite your head off if you don't).



No Warranty

THE PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT WITHOUT ANY WARRANTY. IT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW THE AUTHOR WILL BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.