The EyeWriter 2.0

The EyeWriter 2.0
The EyeWriter is a low-cost eye-tracking apparatus + custom software that allows graffiti writers and artists with paralysis resulting from Amyotrophic Lateral Sclerosis to draw using only their eyes.

The original design, as shown here, featured a pair of glasses as the basis for the eyewriter design:


Since that first video, we've been hacking on and developing the project, and we have a new design, which we've called "eyewriter 2.0" which improves the accuracy of the device, and allow for people who's heads are moving slightly to also use an eye tracker. The original eyewriter, designed for a paralyzed Graffiti artist TEMPT1, is designed to be worn on a completely motionless head. The 2.0 design, which uses a camera and LED system mounted away from the head, can be used by people whose heads are moving slightly, such as MS patients, and people who wear glasses, etc.


This eyewriter system is cheap, and completely open source.  At the moment, it costs about 200$ in parts.  Traditional commercial eye trackers costs between $9000-$20,000, so this is a magnitude of order cheaper, and is designed to help anyone who wants or needs an eyetracker.

This fall, we've been showing off and demoing the 2.0 device -- check out the eyewriter 2.0 in action --  we even hooked it up to a robotic arm, to draw the artwork people make with their eyes: 

http://www.switched.com/2010/12/13/eyewriter-teams-up-with-robotagger-to-print-kids-ocular-artwork/print/


(The 2.0 device was designed with help and input from Takayuki Ito, Kyle McDonald, Golan Levin and students of the eyewriter collab at Parsons MFADT.  Thanks also to the Studio for Creative Inquiry / CMU for hosting a session for development)



 
Remove these adsRemove these ads by Signing Up
 

Step 1Overview

The basic idea approach is that we'll be doing a few things. First, we'll be making LED illuminators for the sides of the screen and the center. Second, we'll be hacking the PS3 eye camera to get the vertical sync (when the frame of video is being taken) and to make it sensative to IR. Third, we'll be programming and building the arduino / cirucit to control the blinking. Finally, we'll setup the base for the system and go through the basics of the software.

From a technical perspective, the 2.0 system works by strobing 3 IR illuminators every frame. On even frames, it uses the center illuminator (located around the camera lens) and on odd frames it uses the 2 side illuminators. On even frames, the pupil appears bright, since the IR light is actually bouncing off the back of your eye, like red eye effect. On odd frames, your pupil appears dark. The difference between the two allows us to isolate and track the pupil in realtime. Additionally, the glints (reflections of the IR illuminators) of the dark frame are tracked, and these, plus the info on the pupil, is calibrated to screen position using a least squares fitting process for an equation that provides a mapping of glint/pupil position to screen position.  
« Previous Step   View All StepsNext Step »
87 comments
1-40 of 87next »
Nov 26, 2011. 7:24 AMtmandragora says:
I can't compile the project with xcode and the newest openframeworks download. Lots of errors, warnings that some stuff is deprecated. Do I need an older openframeworks version?
Sep 22, 2011. 5:17 PMcpeñafiel says:
Hi I'm from chile, I want to build an eye writer, but I can get only arduino uno, arduino not coming out in the instructions. alduino uno serves?
Sep 6, 2011. 7:30 AMKernsville says:
My wife has ALS and has very little movement capability. We have tried some commercial "EyeGaze" systems, but they are fairly inaccurate and are integrated into sub-standard computers with large mounting systems that take up a large amount of space. I'm looking to build an EyeWriter 1.0/2.0 so she can use her existing desktop PC.

One Question: We use a LOREX IR Baby Monitor to keep tabs on her when we are not in the room with her. We have a spare camera unit, which has the IR LED's already integrated. I'm not sure if it strobes the IR's, or how to find the vSync pin. Can anyone recommend someplace I can find this information, or if anyone has had success using this type of camera before?

Thanks,
CK
Jul 26, 2011. 4:53 PMlkwhite says:
Hi all,
I work at a science museum and we are trying to get this working. The guys in the shop have done their part with all the hardware, and now it's up to me, for the software side. I've gotten the software running on both Windows 7 and Mac OS X, and it does recognize my eye-- however, I can't seem to get to the different modes (calibration, drawing, pong, etc) from the app. If I change the mode in the code and re-compile, I can see those different screens. But it sounds like I should be able to press the spacebar from within the main app, and find the calibration screen. Seems like this is crucial to get to interact with it as a mouse!

I'd really appreciate any pointers or suggestions you might have.
Jun 2, 2011. 8:11 PMRealMaxwell says:
I got it to work on XP SP3 and uploaded a (50mb) zip of the bin directory to a skydrive account and made it public:

http://cid-f966c677a7c86219.office.live.com/embedicon.aspx/Remote%20Eye%20Tracker%20Windows

Refer to the instructables to change from demo mode to live. No documentation on the settings so you are on your own. Took me a long time to find the sweet spot to get the glints to lock on, but I overlook a lot of obvious things. Couldn't get the typing program to speak the words but I'm thrilled I got it to work at all.

Real
Jul 7, 2011. 9:54 PMdarkarrow916 says:
So just realised that changing the deviceId has no effect on the exe. Would you know if there's a fix? Thanks so much. I do appreciate it.
Jul 8, 2011. 7:50 AMRealMaxwell says:
I'm afraid that's way out of my league - maybe message an author at openframeworks or github directly - sorry and good luck!
Jul 8, 2011. 8:42 AMdarkarrow916 says:
And by that I mean to say... OH DEAR GOD PRETTY PLEASE!
Jul 8, 2011. 9:27 AMRealMaxwell says:
Be happy to - what's a solution file and where would I find it?
Jul 11, 2011. 1:48 PMdarkarrow916 says:
I just realised you used code blocks. So it would be your cbp file? It'll be easier if you zipped the project folder and upload it I'll do the rest of the work. Thanks so much again. You have no idea how much I appreciate it.
Jul 11, 2011. 9:47 PMRealMaxwell says:
No problem -
Uploaded the cbp file and others in the directory, then zipped everything except the bin directory which is already zipped and uploaded. Lemme know if thats what you needed.
Jul 12, 2011. 12:14 PMdarkarrow916 says:
Fantastic.... Had an error under the inputManager.cpp - undefined reference to ofxThread::stopThread(bool). Have you encountered this error? What version of OpenFrameworks did you use?
Jul 13, 2011. 8:22 AMRealMaxwell says:
I used 61. I had many errors but that seems familiar. My only tool was commenting out sections until it kept going. As a result, I've noticed much of the draw program doesn't work. I'm mostly concentrating on getting mine to track consistently and the typing program. If you get a full working version, let me know.
Thanks!
Jul 13, 2011. 10:46 AMdarkarrow916 says:
Thanks. For now I'm going to have a friend with a Mac test it until I figure out a concrete solution to this.
Jul 8, 2011. 8:11 AMdarkarrow916 says:
Any chance you could upload the whole solution file? I could take a look.
Jul 7, 2011. 9:30 PMdarkarrow916 says:
Hey, your app works very well. I just need help with the camera set up. I keep getting the following error.
OF_ERROR: Error allocating a video device.
OF_ERROR: Please check your camera with AMCAP or other software

AMCAP and the CL Eye Test both show that the camera works correctly. Not sure what to do next. Tried values 0,1,2,3,4 under DeviceId in the settings file but it still shows "SETUP: Setting up device 0"
Jun 4, 2011. 8:00 PMvzdemon says:
i wonder if i can just use a ps3 eye without the Aurdino
Jun 4, 2011. 8:45 PMRealMaxwell says:
The arduino syncs the outer and inner leds with the frame rate of the camera so the the inner (pupil) and outer (glint) alternate frames - but you could use something other than an arduino (I don't know what)
Jun 4, 2011. 10:27 PMvzdemon says:
thank you, have you ever seen this one? the eyewriter 1.0  it can work with only a ps3eye and some IR LEDs, but the developer gives two separate application on googlecode, do you know how to let the tracker and drawer work together? 
Jun 5, 2011. 10:01 AMRealMaxwell says:
Yeah the eyewriter 1.0 was what I saw on the TedTalk video that got me interested. I never worked on it because it seemed the head had to be completely still to work. I'm sorry... I don't know anywhere near enough to tell you how to get tracking and draw to work together - I just learned how to solder for this project, and I'd never compiled a program before the eyewriter 2 software.
I had a little luck emailing the people who wrote the code directly when I got stuck compiling but the question had to be very specific to get a usable answer. Most responses were "I don't know what you are doing wrong" and "Keep trying until you figure it out".
Jun 5, 2011. 11:23 PMvzdemon says:
thank you
Jun 23, 2011. 11:23 PMdarkarrow916 says:
Hi just started my quest to build this. Problem? I'm in Canada. I was wondering if anyone up here has found a cheap equivalent to the M12 lens and lens holders.
Thanks!
May 27, 2011. 10:16 AMd_dooms says:
I'm not able to open RemoteEyeTracker.xcodeproj with Visual C++ IDE, could you walk me through?

Thank you!!
Jun 20, 2011. 7:55 PMatl1 says:
I was going to ask the same thing, I did some research and someone was nice enough to compile it for windows. Here give this link a try:

https://skydrive.live.com/?cid=f966c677a7c86219&sc=documents&id=F966C677A7C86219%21103
Jun 10, 2011. 2:04 PMpgadegast says:
Hi,

I recently started to build an eyetracker and tried the eyewriter.

First question:
I use the linked eyewriter project, but it looks as the first eyewriter-version and calibration does not work... The software UI looks much simpler. (I got the eyewriter code working with the current open frameworks version...)

Second question:
Do I really have to do the strobing stuff? I want to build an head mounted device, using right now just one IR-Led... does the software work with a head mounted device, using only one, not strobing ir-led?

Apr 30, 2011. 3:06 PMRealMaxwell says:
Built EyeWriter 2.0 hardware and it works great in the cl-eye test window.

I am not a programmer. Trying to compile the project to run in Win XP via Code::Blocks and after shuffling missing files into place, I'm now at line 52 of trakingmanager_controlpanel.cpp with error message ofxLibdcPtGrey was not declared in this scope & cam was not declared in this scope. Where should I go for help?
Better yet (as russ_hensel posted), is there a windows executable of the eyewriter software available anywhere?

Thank you for posting the project!
Real
May 11, 2011. 7:01 AMwingnut87 says:
did you ever get this working in windows?
May 11, 2011. 5:19 PMRealMaxwell says:
Not yet but only able to work on it short stretches. The only thing I lack more than time is ability. I'm pretty sure I'm making a lot of very basic mistakes - I've never seen the inside of a program before this so it might be a while...
May 10, 2011. 12:19 AMJoell says:
Essentially this error happens because the eyewriter software was built and developed on a MAC and you're trying to compile it on windows. As a fix, there're some #if_def switches that have to be added to turn off the calls to those particular libraries when you're in windows.

I had a similar problem and contacted the developers directly. Kyle McDonald, one of the core programmers replied with this:
"to build ew 2.0 in windows, i recommend using this branch:

https://github.com/eyewriter/eyewriter/tree/remoteEyetracker/eyeWriterTracker

and using 0061. it might work with 0062 but i'm pretty sure that last
time we updated it we were still using 0061.

the 'osx specific' calls you see are probably calls to libdc1394,
which is what ofxLibdc is wrapping. ofxLibdc only compiles on osx. the
.cbp shouldn't include ofxLibdc, and there are switches in the source
code like this (in inputManager.h):

#ifdef TARGET_OSX
#include "fireflyVideoGrabber.h"
#endif

so that ofxLibdc is only included when you're on OSX.

if you have a specific error while building, let me know.

-kyle"

Hope this helps. Meanwhile, to switch branches and things like that, read up on how to use git and github etc.
May 11, 2011. 5:12 PMRealMaxwell says:
Thanks for the help! started over with 0061 and 4c1f73 - its been very educational.
- trying to get to point where I can ask a coherent question...

Thanks Again!
Real
May 11, 2011. 6:58 AMwingnut87 says:
This is really cool, and I'd love to build one of these. I was wondering a few things though:

First off, have people gotten this working on windows (w7, in particular) easily? Or is there a bunch of fumbling with the code to get it going? Are there any instructions available? Do I just download the files at this link? https://github.com/eyewriter/eyewriter/tree/remoteEyetracker/eyeWriterTracker

Second, can this device replace a mouse as a general input method for the computer? Will it work with any program? Or do I have to be in the eye writer application for it to work? I'm much less interested in drawing than I am with using a mouse to control anything I want on the computer, like a conventional mouse. I don't need it to click, just to move the cursor.

Third, how accurate is this? Are people able to control the cursor to within +/- a few pixels? More? Less? How much can you move your head? A few mm? A few inches? A few feet?

Thanks in advance if anyone can answer these questions!
Mar 17, 2011. 8:01 AMruss_hensel says:
I am a reasonably experienced programmer in Java, Python, embedded C, and have a fair experience with microcontrollers including both the Arduino and PICs. I would like to try to build an eyewriter in the windows environment. I do not want to become an expert in the software tools for eyewriter but realize I will probably need to build a windows version ( or can you guys just build it and distribute it built: this would be much easier for the rest of us ). Is there someone on your team who can answer questions about the software in the windows environment? ( if so how to best contact )
Mar 30, 2011. 9:32 AMruss_hensel says:
So are any of the authors still active on this project?
Dec 17, 2010. 10:00 PMmikesnyd says:
This is amazing and will allow to open a world for motionless people to use a computer and enter a workforce bringing their life meaning. really wonderful. Maybe even for speaking for themselves should death be an option. Not really but alows their voice to be heard. stellar project. Big ups. Oh and what song is that playing? Nice tune
Feb 20, 2011. 11:38 PMjordomaller says:
man on the moon kid cudi
Jan 12, 2011. 2:38 AMcarpii says:
Are there any special characteristics with the board lens?
In the UK its really hard to find some of these components, Ive ended up getting most of them shipped over from US at great cost.

Heres a UK supplier for board lenses. Could you let me know if this would be suitable please?

http://www.onlinesecurityproducts.co.uk/genie-cctv-lenses/genie-cctv-gl25-pcb-minature-dome-lens-25mm.html
Feb 11, 2011. 2:28 PMcarpii says:
Ok, well just incase anyone has the same question, I can confirm these lenses work fine. I was worried because they were fixed focal length, but its not an issue and apparently most board lenses are fixed focal length anyway
Feb 20, 2011. 3:20 PMj44 says:
Hi carpii,

I am also UK based and am thinking of building an eyewriter.
What mount did you use with the lens?

Thanks

Feb 20, 2011. 4:30 PMcarpii says:
Hi, I ended up ordering all the exact parts, shipped in at great cost from the US Im afraid :(

Im sure this wasn't strictly necessary, but Im a software guy primarily, and If my eyewriter wasn't working, I didn't want the uncertainty of thinking Id ordered parts which weren't quite right.

I struggled to find any UK suppliers for most of the parts. The rheostats and a few other bits Ive since found on ebay though, so give that a try.

I intentionally ordered too many lens mounts (just incase), but I doubt I'll ever use them. If you just need one, drop me your address and Ill be happy to send you it.
Feb 20, 2011. 4:33 PMcarpii says:
Oh I can probably give you an IR filter too. You;re on your own with the rest though, sorry :D

Be sure to join the eyewriter github if you do build one. I'd love to see a more active community of people building them
1-40 of 87next »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
14
Followers
1
Author:thesystemis