Haytham Gaze Tracker

Free and open-source eye tracking software for remote and head-mounted setups


Haytham is an open source gaze tracker suited for head-mounted or remote setups. It provides real-time gaze estimation in the user’s field of view or in a computer display by analyzing eye movement. Haytham offers gaze-based interaction with computer screens in fully mobile situations. The software is built by C#, using Emgu and AForge image processing libraries.
Haytham software was developed by Diako Mardanbegi during his PhD thesis (at 2011) supervised by Dan Witzner Hansen at the IT University of Copenhagen.


Main Features

  • Real-time gaze estimation in the user's field of view;
  • Remote camera gaze tracking for remote setup;
  • Supporting the video files as input for offline processing;
  • Exporting the eye/scene videos;
  • Exporting the eye tracking data as a .txt file;
  • Undistorting the scene image (distortion can occur when you are using wide-angle lenses);
  • Real-time plotting the eye data;
  • Blink and double blink detection;
  • Head gesture recognition. Haytham detects head movements (pitch, yaw, and roll) through the eye movements. There are some predefined gestures in the software and it also lets the users to define custom head gestures;
  • Streaming the eye and gaze tracking data (e.g. pupil position, gaze point, pupil diameter, and iris torsion) to the network;
  • Streaming the head gestures and other gaze-based commands as well as gaze data through the network via TCP/IP;
  • Detecting the visual markers and displays in the scene image;
  • Mobile gaze-based interaction with multiple displays in environment;
  • Mobile gaze-based interaction with objects in environment.

The Haytham gaze tracker also works with OGAMA. If you need a software for analysing eye and mouse movements check out the OGAMA. The new version works with the Haytham gaze tracker.  OGAMA is an open source software for recording and analyzing eye and mouse tracking data.


The Haytham gaze tracker is divided into the main gaze tracker software (server) and variety of application softwares (Haytham_Clients). The Haytham gaze tracker does the eye tracking and scene image processing and streams the data through network via TCP/IP. Haytham_Clients are basically different applications that use gaze tracking and the other data provided by the Haytham server. Haytham is hosted in sourceforge where you can download the binaries or check out the source code.

Download the source code from here. You can download the source code using a svn client (e.g, TortoiseSVN) or you can download the revision that you're looking at as a zip file just by clicking on the "Download Snapshot" link in the sourceForge page. How to compile the haytham_server source code: There is a file called "compile.bat" in the haytham_server folder. Click on this file and it generates the binary version for you and puts that into the folder called "Haytham_server.bin".

System Requirements

  • Windows 7 (32 & 64 bit) or higher;
  • .NET Framework 4; and
  • Head-mounted or remote eye tracker hardware (check build your own head-mounted eye tracker).

Where did the name Haytham come from?


The Haytham is released under a dual license:

Free Version:

The source code is released under GPL version 3.0. In short, it means that any distributed project that includes or links any portion of Haytham source code has to be released with the source code under a license compatible with GPLv3.

Commercial version:

If you want to use the Haytham in a closed source commercial product, you must purchase the license. Please contact the ITU Business Development <khfa@itu.dk>.