- Name of the technology: TrackEye
- Link: http://www.codeproject.com/Articles/26897/TrackEye-Real-Time-Tracking-Of-Human-Eyes-Using-a
- Price: Free
- Popularity: rize winner in Competition "Best C++/MFC article of June 2008".
- Minimal physical requirements: The patient has to be able to move his eyes freely.
Eyes are the most important features of the human face. So effective usage of eye movements as a communication technique in user-to-computer interfaces can find place in various application areas.
Eye tracking and the information provided by the eye features have the potential to become an interesting way of communicating with a computer in a human-computer interaction (HCI) system. So with this motivation, designing a real-time eye feature tracking software is the aim of this project.
The purpose of the project is to implement a real-time eye-feature tracker with the following capabilities:
- RealTime face tracking with scale and rotation invariance
- Tracking the eye areas individually
- Tracking eye features
- Eye gaze direction finding
- Remote controlling using eye movements
Instructions to Run and Rebuild TrackEye
Extract TrackEye_Executable.zip file. Before running TrackEye_636.exe, copy the two files SampleHUE.jpg and SampleEye.jpg to the C:\ folder. These two files are used for CAMSHIFT and Template-Matching algorithms.
There are no other steps to be followed by the user to run the software. There are no DLL dependencies as the software was built with the DLLs statically included.
Settings to be Done to Perform a Good Tracking
Settings for Face & Eye Detection
Under TrackEye Menu --> Tracker Settings.
- Input Source: video
- Click on Select file and select ..\Avis\Sample.avi
- Face Detection Algorithm: Haar Face Detection Algorithm
- Check “Track also Eyes” checkBox
- Eye Detection Algorithm: Adaptive PCA
- Uncheck “Variance Check”
- Number of Database Images: 8
- Number of EigenEyes: 5
- Maximum allowable distance from eyespace: 1200
- Face width/eye template width ratio: 0.3
- ColorSpace type to use during PCA: CV_RGB2GRAY
- Settings for Pupil Detection
Check “Track eyes in details” and then check “Detect also eye pupils”. Click “Adjust Parameters” button:
- Enter “120” as the “Threshold Value”
- Click “Save Settings” and then click “Close”
- Settings for Snake
Check “Indicate eye boundary using active snakes”. Click “Settings for snake” button:
- Select ColorSpace to use: CV_RGB2GRAY
- Select Simple thresholding and enter 100 as the “Threshold value”
- Click “Save Settings” and then click “Close”
- So far there has been a lot of work on eye detection and before the project, the previous methods were carefully studied to determine the implemented method. We can classify studies related to eye into two main categories as listed below.
Special Equipment Based Approaches
These type of studies use the necessary equipment which will give a signal of some sort which is proportional to the position of the eye in the orbit. Various methods that are current in use are Electrooculography, Infra-Red Oculography, Scleral search coils. These methods are completely out of our project.
Image Based Approaches
Image based approaches perform eye detections on the images. Most of the image based methods try to detect the eyes using the features of the eyes. Methods used so far are knowledge-based methods, feature-based methods (color, gradient), simple template matching, appearance methods. Another interesting method is “Deformable template matching” which is based on matching a geometrical eye template on an eye image by minimizing the energy of the geometrical model.
Implementation of TrackEye
The implemented project is on three components:
- Face detection: Performs scale invariant face detection
- Eye detection: Both eyes are detected as a result of this step
- Eye feature extraction: Features of eyes are extracted at the end of this step
- Face Detection
Two different methods were implemented in the project. They are:
- Continuously Adaptive Means-Shift Algorithm
- Haar Face Detection method
- Continuously Adaptive Mean-Shift Algorithm
- Adaptive Mean Shift algorithm is used for tracking human faces and is based on robust non-parametric technique for climbing density gradients to find the mode (peak) of probability distributions called the mean shift algorithm. As faces are tracked in video sequences, mean shift algorithm is modified to deal with the problem of dynamically changing color probability distributions. The block diagram of the algorithm is given below:
Haar-Face Detection Method
The second face detection algorithm is based on a classifier working with Haar-Like features (namely a cascade of boosted classifiers working with Haar-like features). First of all it is trained with a few hundreds of sample views of a face. After a classifier is trained, it can be applied to a region of interest in an input image. The classifier outputs a "1" if the region is likely to show face and "0" otherwise. To search for the object in the whole image, one can move the search window across the image and check every location using the classifier. The classifier is designed so that it can be easily "resized" in order to be able to find the objects of interest at different sizes, which is more efficient than resizing the image itself.