[solved] Eyetracking using regular webcam
Hello guys!
I would like to ask if is possible to use a regular webcam and PyGaze to track gazes, fixation durations and saccades? I plan to collect this data when an user is reading texts in a computer.
If it is possible, do you have any hint about where I should start?
Thanks in advance!
Comments
Hi Wesley,
The short answer, I'm afraid, is: no. Most eye trackers are more than just a normal camera + software. First, they are usually near-infrared cameras, because the pupil is easier to detect in the near-infrared spectrum. Second, most eye trackers have one or more near-infrared LEDs that shine on the cornea and give a reflection (the corneal reflection) that can be tracked quite easily.
Assuming that you're interested in doing eye tracking on a budget, you could consider buying a cheap eye tracker. For example, a few of us have been experimenting with the EyeTribe, which is really cheap and does decent tracking. See here
Btw, it's not impossible to do eye tracking with a webcam. For example, @Edwin has a fun page on that here:
But I wouldn't say it's a viable option at the moment.
Cheers,
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Thanks @sebastiaan !
Actually I'm planning to run a pilot study on screen-based reading, with a remote tracking setup with almost no budget. So, buying an eye tracker will be the next step.
I came across the Pupil Project and I was wondering if will be possible to use PyGaze with a modified HD webcam adding IR LED's and IR pass filter, as described at:
So, the question is: if I managed to modify the webcam correctly, will the PyGaze be able to process the datas provided by the webcam?
Hi Wesley,
Sorry for the late reply, this escaped my attention!
Natively, PyGaze does not support any other input device than eye trackers manufactured by EyeTribe, SMI, SR Research, and Tobii. However, since PyGaze is Python based, you could use it to interface with other devices by using their respective APIs (provided Python bindings are available).
Alternatively, you could opt for creating integration with PyGaze yourself, by creating a custom EyeTracker subclass, as we did for the aforementioned tracker brands. You can find examples of these on GitHub.
In short, what you will have to do is create your own implementation of (almost) all of the methods listed in BaseEyeTracker. For examples, please refer to the SMI and EyeTribe classes (which are relatively straightforward).
Alternatively, you could opt for buying an EyeTribe tracker, as @sebastiaan mentioned before. These are cheap (about $150, including VAT and delivery), and are supported out of the box with PyGaze and OpenSesame. Do note that they only go up to 60 Hz, so they will not allow you to do all types of eye tracking (in short: pupilometry and fixation behaviour should be fine, but saccadometry will be a problem).
Good luck!
Thank you very much @edwin!
I'm trying to get budget to buy an EyeTribe tracker. I believe it will be the best solution according with my current conditions.
You can try http://sourceforge.net/projects/gazepointer/ it works with ordinary webcam
I am not sure if an ordinary webcam could solve your problem, but it seems to me that it's not quite possible without the help of other tool. I am not quite skillful at this, so I would like to know if you have solved that and hope to hear how it is solved.