We found some articles that informed us about how to capture alternating frames of bright eye/dark eye. The “bright eye” concept is something we first heard about from Mark at Eyegaze, a very precise commercial eye tracking system, which uses this bright eye/dark eye method to track eye movement. Similar to the “red eye” effect when taking photos with flash (the red is the light bouncing off the back of your eye and reflecting the color of the blood in your eye), the “bright eye” occurs when enough concentrated infrared light bounces off the back of your eye and reflects as white. (Below is a photo of the “bright eye” taken in a dark room making the pupil large.)

We’ve been testing alternating the LEDs  with the camera’s frame rate to turn on IR every other frame. Along with this we’ve created a circuit to create enough IR light to give us the white “bright eye”. Ito did some legwork, and figured out the specifications: 10 infrared LEDs (Agilent HSDL-4220 880nm diodes) in a circle on a small (1 7/8″ x 2 1/4″) solderable perf-board MED copper pad circuit board that fits around the Eye Camera lens. (We had to use a drill to cut a hole in the middle of the board that’s big enough to fit around the lens.) And to be safe, we added resistors to the LEDs. After setting up the LED ring around the Eye
Camera, we hooked up the LED ring and the wires attached to the camera’s VSYNC to Arduino.
Thanks to Kyle, we are continuing the test for alternating 2 LED light sources. We improved the Arduino code (below) to control the lighting duration and the timing for each frame. To check this, we made an application with openFrameworks to see successive 64 frames in one screen. Unfortunately there are still some bad frames – some frames both LEDs are off/not alternating, which might be caused by how we’re programming the capturing of the LEDs.
References:
Carlos Morimoto, Dave Koons, Arnon Amir, Myron Flickner. Real-Time Detection of Eyes and Faces. In Proceedings of 1998 Workshop on Perceptual User Interfaces, pages 117-120, San Francisco, CA, November 1998.
http://www.acm.org/icmi/1998/Papers/Morimoto.pdf
C.H. Morimoto, D.koons, A.Amir, M.Flickner. Frame-Rate Pupil Detector and Gaze Tracker. IEEE ICCV’99 FRAME-RATE Workshop, 1999.
http://sirl.stanford.edu/~bob/pdf/EyeTracking/Morimoto_pupilcam_preprint99.pdf
Craig Hennessey, Borna Noureddin, Peter Lawrence. A Single Camera Eye-Gaze Tracking System with Free Head Motion. Proceedings of the 2006 symposium on Eye tracking research & applications, March 27-29, 2006, San Diego, California.
http://portal.acm.org/citation.cfm?id=1117349
Y. Ebisawa. Unconstrained pupil detection technique using two light sources and the image difference method. Visualization and Intelligent Design in engineering and architecture, pages 79-89,1995.
http://library.witpress.com/pages/PaperInfo.asp?PaperID=10807
Wikipedia â€Red eye effectâ€
http://en.wikipedia.org/wiki/Red-eye_effect
Below is the latest Arduino code.
/// =====================
// Arduino code
// =====================
// Using Arduino MINI04
// LED1 is connedted to pin11 with 1k resistor.
// LED2 is connected to pin12 with 1k resistor.
// VSYNC signal from PS3EYE is connected to pin2.
// Port Registers are used to control LED accurately.
int currentTurn = 0;
int prevTurn = 0;
int count = 0;
int delarray[100];
int delcounter;
int delval;
int prevDelval;
int state = 0; // 1: LED1, 2: LED2
int DURATION = 360; //Duration of lighting
int DELAYTIME = 0; //Delay time
void setup() {
// Port D pin order : 7,6,5,4,3,2,1,0
// Port B pin order : ?,?,13,12,11,10,9,8
DDRD = DDRD & B00000011; // set pin 7-2 as INPUTs
DDRB = DDRB | B00011000; // set pin 11,12 as OUTPUTs
delcounter = 0;
delval = 0;
}
void loop(){
if (((PIND & B00000100) != 0) && prevTurn == 0) { // check pin2 & prevTurn
currentTurn++;
currentTurn = currentTurn % 2;
prevTurn = 1;
} else if ((PIND & B00000100) == 0) { // check pin2
prevTurn = 0;
}
// Delay Process
delarray[delcounter] = currentTurn;
delval = delarray[(delcounter - DELAYTIME) % 100];
prevDelval = delarray[(delcounter - DELAYTIME - 1) % 100];
//LOW -> HIGH or HIGH to LOW
if (delval == 1 && prevDelval == 0) {
count = 0;
state = 1;
}
if (delval == 0 && prevDelval == 1) {
count = 0;
state = 2;
}
//
if (count < DURATION) {
if (state == 1) {
PORTB = B00010000; // set pin12 ON, pin11 OFF
}
if (state == 2) {
PORTB = B00001000; // set pin12 OFF, pin11 ON
}
count++;
} else {
PORTB = B00000000; // set pin11 & 12 OFF
}
delcounter++;
delcounter = delcounter % 100;
}
// ======================================================