Code Monkey home page Code Monkey logo

gazeosc's Introduction

GazeOSC

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

Install

Requirements

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).

Configure OSC Settings and Usage

Press f to toggle fullscreen. The program will detect eye location regardless of if it's in fullscreen mode.

Data

There are three categories of data that you can send from GazeOSC.

  1. 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
  1. 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
  1. 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

OSC Port & Host

Set the host and port number for the OSC stream. Hit enter/return or r to update the changes you make.

Transform Coordinates

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.

Development

To edit the GazeOSC source code, you'll need Visual Studio 2017 on a Windows machine.

  1. Install the ofxTobiiEyeX extension to your openFrameworks directory.
  2. Copy [youOpenFrameworksDir]/addons/ofxTobiiEyeX/libs/TobiiEyeXSdk/lib/x64/Tobii.EyeX.Client.dll to gazeOSC/bin/.
  3. Set the build settings to Debug and x64.
  4. 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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.