Free software turns webcams into eye-trackers

June 03, 2016 // By Peter Clarke
Brown Eye Track
Computer scientists at Brown University (Providence, Rhode Island) have developed open-source software that identifies the eyes and tracks the gaze of subjects on webcams.

This is a software-only solution that can determine what parts of web page are catching the user's eye and could therefore provide developers with the ability to optimize applications for users or to create additional features within games for example.

Conventionally eye-tracking devices require specialized hardware and therefore can be expensive as well as requiring the head to be in a relatively fixed position a certain distance from the monitor. A software-only solution therefore eliminates cost and could open up applications especially as video cameras are present in computers and mobile phones.

The software, called WebGazer.js, is written in javascipt and can be included in any web browser with only a few lines of code and can perform eye-tracking immediately with an average error of just a 100 pixels.

The software runs on the user's browser and the user's permission is required to access the webcam but no video is shared. Only the location of the user’s gaze is reported back to the website and this can be done in real time.

The software uses a face-detection software library to locate the user’s face and eyes. The system converts the image to black and white to better distinguish the whites of the eyes from the iris. Once the iris is located the software employs a statistical model calibrated against the user's cursor movement and clicks. The model assumes the uses looks at the spot where the cursor clicks and it takes about three clicks to achieve reasonable calibration of the software. Thereafter the model infers the location of the user's gaze in real time.

"Anyone can add WebGazer to their site and get a much richer set of analytics compared to just tracking clicks or cursor movements," said Alexandra Papoutsaki, a Brown University graduate student who led the development of the software, in a statement.

The software code is freely available at