EyeInfo Research Group

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 has been developed by Diako Mardanbegi during his PhD thesis supervised by Dan Witzner Hansen at the IT University of Copenhagen.

The name Haytham comes from the "father of optics" Ibn al Haytham.  He was "the first scientist" who described the eye and its functioning, and he made mathematical descriptions of the properties of light. He is commonly referred to as Ibn al-Haytham or Alhazen who was born in 965 in Basra (in present day Iraq). He made significant contributions to the principles of optics, as well as to astronomy, mathematics, visual perception, and to the scientific method. Ibn al-Haytham’s most famous work is his seven volume treatise on optics, Kitab al-Manazir (Book of Optics, written from 1011 to 1021). He was the first scientist in history to insist that everything be proven through a given method for discovering new information. Ibn al-Haytham is regarded as the father of the modern scientific method.

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.

Haytham Server

Haytham Client

More information about the Haytham Clients

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


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 <This email address is being protected from spambots. You need JavaScript enabled to view it.>.


Visit our main homepage and find out more about the EyeInfo Research Group


Meet the diverse research areas in which we have interest to work


Download some of ours latest articles published in symposiums and journals.


Meet our research team and learn about our research group structure.


For more information about our research group, please feel free to contact us.