Improved open source gaze tracker for ordinary webcams (based on OpenGazer)
C++ C Shell QMake
Switch branches/tags
Pull request Compare This branch is 71 commits ahead of opengazer:master.
Latest commit 0dc40e3 May 10, 2016 @tiendan tiendan Solved compilation problems related to non-static member initializati…
…on in header files (for some compilers)
Permalink
Failed to load latest commit information.
config Major structure changes. New blink detection algorithm implemented. C… Feb 10, 2016
outputs Add 'outputs' directory to repository so it doesn't bother you about … Jan 7, 2015
std Initial set of changes Oct 29, 2013
.gitignore Minor changes committed to have a clean working directory. Nov 14, 2015
.travis.yml Still working on fixing travis config (3) Feb 11, 2016
AnchorPointSelector.cpp Solved compilation problems related to non-static member initializati… May 10, 2016
AnchorPointSelector.h Solved compilation problems related to non-static member initializati… May 10, 2016
Application.cpp Major structure changes. New blink detection algorithm implemented. C… Feb 10, 2016
Application.h Major structure changes. New blink detection algorithm implemented. C… Feb 10, 2016
BlinkDetector.cpp Major structure changes. New blink detection algorithm implemented. C… Feb 10, 2016
BlinkDetector.h Major structure changes. New blink detection algorithm implemented. C… Feb 10, 2016
CONTRIBUTORS.md Small fixes Feb 10, 2016
Calibrator.cpp Major structure changes. New blink detection algorithm implemented. C… Feb 10, 2016
Calibrator.h Major structure changes. New blink detection algorithm implemented. C… Feb 10, 2016
Command.cpp Use '==' instead of 'compare == 0' for string comparison and 'length'… Jan 7, 2015
Command.h Put getStores in Application, don't pass it, move Command and Command… Aug 7, 2014
Component.h Major structure changes. New blink detection algorithm implemented. C… Feb 10, 2016
Configuration.cpp Major structure changes. New blink detection algorithm implemented. C… Feb 10, 2016
Configuration.h Major structure changes. New blink detection algorithm implemented. C… Feb 10, 2016
DEVELOP.md Updated readme, added onscreen instructions, added guide for developm… Feb 10, 2016
DebugWindow.cpp Added histogram feature extractor and the corresponding GP gaze track… Jul 20, 2015
DebugWindow.h Merged histogram features v2 changes and some fixes for demo purposes Jun 15, 2015
DetectorEyes.xml Initial set of changes Oct 29, 2013
DetectorMouth.xml Initial set of changes Oct 29, 2013
DetectorNose2.xml Initial set of changes Oct 29, 2013
EyeCenterDetector.cpp Solved compilation problems related to non-static member initializati… May 10, 2016
EyeCenterDetector.h Solved compilation problems related to non-static member initializati… May 10, 2016
EyeExtractor.cpp Solved compilation problems related to non-static member initializati… May 10, 2016
EyeExtractor.h Solved compilation problems related to non-static member initializati… May 10, 2016
EyeExtractorSegmentationGroundTruth.cpp Major structure changes. New blink detection algorithm implemented. C… Feb 10, 2016
EyeExtractorSegmentationGroundTruth.h Major structure changes. New blink detection algorithm implemented. C… Feb 10, 2016
FMatrixAffineCompute.cpp Deal with the namespace and #include madness Jul 28, 2014
FaceDetector.cpp Converted most of the OpenCV code to C++ interface and corresponding … Mar 28, 2015
FaceDetector.h Added histogram feature extractor and the corresponding GP gaze track… Jul 20, 2015
FeatureDetector.cpp Added histogram feature extractor and the corresponding GP gaze track… Jul 20, 2015
FeatureDetector.h Converted most of the OpenCV code to C++ interface and corresponding … Mar 28, 2015
FrogGame.cpp Major structure changes. New blink detection algorithm implemented. C… Feb 10, 2016
FrogGame.h Major structure changes. New blink detection algorithm implemented. C… Feb 10, 2016
GaussianProcess.cpp Merged histogram features v2 changes and some fixes for demo purposes Jun 15, 2015
GazeTracker.cpp Solved compilation problems related to non-static member initializati… May 10, 2016
GazeTracker.h Solved compilation problems related to non-static member initializati… May 10, 2016
GazeTrackerHistogramFeatures.cpp Solved compilation problems related to non-static member initializati… May 10, 2016
GazeTrackerHistogramFeatures.h Solved compilation problems related to non-static member initializati… May 10, 2016
GoogleGlassWindow.cpp Major structure changes. New blink detection algorithm implemented. C… Feb 10, 2016
GoogleGlassWindow.h Major structure changes. New blink detection algorithm implemented. C… Feb 10, 2016
HeadTracker.cpp Solved compilation problems related to non-static member initializati… May 10, 2016
HeadTracker.h Solved compilation problems related to non-static member initializati… May 10, 2016
HiResTimer.cpp Fixed the slowness of application. Added fps display to debug window … Apr 23, 2015
HiResTimer.h Fixed the slowness of application. Added fps display to debug window … Apr 23, 2015
HistogramFeatureExtractor.cpp Solved compilation problems related to non-static member initializati… May 10, 2016
HistogramFeatureExtractor.h Major structure changes. New blink detection algorithm implemented. C… Feb 10, 2016
ImageWidget.cpp Fixed the slowness of application. Added fps display to debug window … Apr 23, 2015
ImageWidget.h Finished first phase of migration to Qt Apr 20, 2015
ImageWindow.cpp Major structure changes. New blink detection algorithm implemented. C… Feb 10, 2016
ImageWindow.h Major structure changes. New blink detection algorithm implemented. C… Feb 10, 2016
LICENSE Initial commit of code Nov 16, 2010
LeastSquares.cpp Clean up HeadCompensation, HeadTracker, LeastSquares Jul 27, 2014
LeastSquares.h Add precompiled header for opencv and gtkmm...reduce compile time fro… Aug 4, 2014
MainGazeTracker.cpp Updated readme, added onscreen instructions, added guide for developm… Feb 10, 2016
MainGazeTracker.h Solved compilation problems related to non-static member initializati… May 10, 2016
Makefile2 Finished first phase of migration to Qt Apr 20, 2015
OutputMethods.cpp Major structure changes. New blink detection algorithm implemented. C… Feb 10, 2016
OutputMethods.h Finished first phase of migration to Qt Apr 20, 2015
Point.cpp Major structure changes. New blink detection algorithm implemented. C… Feb 10, 2016
Point.h Major structure changes. New blink detection algorithm implemented. C… Feb 10, 2016
PointTracker.cpp Major structure changes. New blink detection algorithm implemented. C… Feb 10, 2016
PointTracker.h Major structure changes. New blink detection algorithm implemented. C… Feb 10, 2016
PointTrackerWithTemplate.cpp Major structure changes. New blink detection algorithm implemented. C… Feb 10, 2016
PointTrackerWithTemplate.h Major structure changes. New blink detection algorithm implemented. C… Feb 10, 2016
Prefix.hpp Finished first phase of migration to Qt Apr 20, 2015
README.md Updated readme with how to contribute section Feb 17, 2016
TestWindow.cpp Major structure changes. New blink detection algorithm implemented. C… Feb 10, 2016
TestWindow.h Major structure changes. New blink detection algorithm implemented. C… Feb 10, 2016
Video.cpp Major structure changes. New blink detection algorithm implemented. C… Feb 10, 2016
Video.h Added histogram feature extractor and the corresponding GP gaze track… Jul 20, 2015
background_full.png Initial set of changes Oct 29, 2013
configure Still working on fixing travis config and polishing the installation … Feb 11, 2016
dependencies.sh Final touches to the readme and the dependency installation script. Feb 11, 2016
elipse.jpg Major structure changes. New blink detection algorithm implemented. C… Feb 10, 2016
ffmpeg.sh Still working on fixing travis config (3) Feb 11, 2016
frog-mask.png Initial set of changes Oct 29, 2013
frog.png Initial set of changes Oct 29, 2013
gaussian-mask.png Final touches for the frog game Jun 15, 2015
haarcascade_frontalface_alt.xml Initial commit of code Nov 16, 2010
mir.cpp Initial set of changes Oct 29, 2013
mir.h Initial set of changes Oct 29, 2013
opengazer.cpp Finished first phase of migration to Qt Apr 20, 2015
opengazer.pro Major structure changes. New blink detection algorithm implemented. C… Feb 10, 2016
rbf_interp.cpp Initial set of changes Oct 29, 2013
rbf_interp.hpp Initial set of changes Oct 29, 2013
target.png Initial set of changes Oct 29, 2013
utils.cpp Major structure changes. New blink detection algorithm implemented. C… Feb 10, 2016
utils.h Major structure changes. New blink detection algorithm implemented. C… Feb 10, 2016

README.md

CVC Eye Tracker Build Status

This eye tracking software is based on the open source project [Opengazer] (http://www.inference.phy.cam.ac.uk/opengazer/) and is improved with several features. The updated software supports video recording for offline processing, offline batch processing, enhanced video outputting for visual analysis of experiments and a head repositioning feature which allows users to correct their head pose during eye tracker usage in order to improve accuracy.

This software is the result of [on-going research] (http://mv.cvc.uab.es/projects/eye-tracker) in [Computer Vision Center (CVC)] (http://www.cvc.uab.es/index.asp?idioma=en) and [Universitat Autònoma de Barcelona] (http://uab.es/english/), Barcelona. Please refer to the [CONTRIBUTORS] (https://github.com/tiendan/OpenGazer/blob/master/CONTRIBUTORS.md) file for the list of contributors in this project and the [DEVELOP] (https://github.com/tiendan/OpenGazer/blob/master/DEVELOP.md) file for how to develop additional modules.

The automatic installation for [Mac OS X and Ubuntu] (#scripted-installation-for-mac-os-x-or-ubuntu-systems) are below. If you have problems with this script, you can try the manual installation steps for [Mac] (#manual-installation-using-macports-on-mac-os-x-systems) and [Ubuntu] (#manual-installation-on-ubuntu-1204) at the bottom.

After installation, check the [usage instructions] (#basic-usage-instructions).

Scripted Installation for Mac OS X or Ubuntu systems

OS X only: Install Xcode, Xcode Command Line Tools, XQuartz and Homebrew

Open a terminal and run:

  • cd opengazer
  • sudo bash dependencies.sh
  • ./configure
  • make

Basic Usage Instructions

  1. Put the camera centrally under you monitor, so that the height of your face in the image is about half of the height of the image, and close to the centre of the image. Make sure the background light level is reasonably constant across the image.
  2. Following the onscreen instructions, press the X key to choose anchor points on your face (repeat until you are happy with the results).
  3. Press the C key to start the calibration.
  4. When the calibration ends, the sample frog game will start. Here, the aim is to find the hidden frog. You have to use your gaze to locate the frog and stare at it for a few seconds until the frog is teleported to another location. Remember to keep still and only use your eyes for playing (and for calibration too!).

How to Contribute

One nice-to-have feature would be compilation on Windows. If anybody wants to attempt it, here are some links:

  1. [boost library] (http://www.boost.org/doc/libs/1_55_0/more/getting_started/windows.html)
  2. [Gsl for Windows] (http://gnuwin32.sourceforge.net/packages/gsl.htm)
  3. [OpenCV + ffmpeg] (https://github.com/Itseez/opencv/tree/ddf82d0b154873510802ef75c53e628cd7b2cb13/3rdparty/ffmpeg)
  4. [OpenCV + ffmpeg (additional)] (http://kronoskoders.logdown.com/posts/256664-installing-opencv-and-ffmpeg-on-windows)
  5. [FANN (currently not used, but still in configuration)] (http://leenissen.dk/fann/wp/help/installing-fann/)

If you get it working, let me know! Apart from this, for developing another module (eye corner detectors, iris center detectors, gaze estimation methods, etc.), check the [DEVELOP] (https://github.com/tiendan/OpenGazer/blob/master/DEVELOP.md) file for instructions.

Manual Installation using MacPorts on Mac OS X systems

This has been tested on a MacBook with OS X 10.6, 10.8 and 10.9, both with the built-in iSight camera and a Logitech webcam.

  1. Download and install [Xcode] (https://developer.apple.com/xcode/)
  2. Download and install [Qt] (http://www.qt.io/download-open-source/)
  3. Download and install the latest version of [MacPorts] (http://www.macports.org/)
  4. Update the port definitions and install the required packages from MacPorts. Note that this might take a long time since all these packages have a lot of dependencies:
  • sudo port selfupdate
  • sudo port install gsl cmake ffmpeg opencv fann boost
  1. Download and install [XQuartz] (http://xquartz.macosforge.org/landing/)
  2. Open a terminal and build the software:
  • cd opengazer
  • ./configure
  • make

NOTES: Version @2.4.6_1 of OpenCV from MacPorts has a bug which prevents access to the webcam. In such a case, the preferred version (@2.4.6_0) can be installed with the following steps (steps from [here] (http://www.codedrop.ca/blog/archives/56)):

  1. Modify the configuration file of MacPorts:
  • sudo nano /opt/local/etc/macports/sources.conf
  • Add file:///Users/Shared/dports before rsync line
  • Save (Conrol+O) and exit (Control+X)
  1. Create the same folder in Terminal:
  • mkdir /Users/Shared/dports
  1. Download the definitions for the old version of OpenCV:
  2. Update the indices of MacPorts:
  • portindex /Users/Shared/dports
  1. Verify that the old version (2.4.6) is now available in MacPorts:
  • port list opencv*
  1. Install the old version:
  • sudo port install opencv @2.4.6

Manual Installation on Ubuntu 12.04

Tested on a clean installation of Ubuntu 12.04 with a Logitech webcam.

  1. Install required libraries
  • sudo apt-get install libopencv-* libboost-dev libgsl0-dev libfann2 libfann-dev libv4l-dev cmake libboost-system-dev libboost-filesystem-dev
  1. Download and install [Qt] (http://www.qt.io/download-open-source/)
  2. Install GSL from source
  1. [Build and install] (https://trac.ffmpeg.org/wiki/UbuntuCompilationGuide) FFMPEG 0.7.13
  2. Build eyetracker
  • cd opengazer
  • ./configure
  • make