views:

136

answers:

3

Hello,

I am looking for some suggestions on how to approach the following computer vision problem. Below are 4 samples of an eye tracking dataset that I am working with. I would like to write code takes one such image and calculates the (x,y) position of the center of the pupil. I am currently using MATLAB, but I am open to using other software too.

Can someone recommend an approach I could use for this task? Here are some things I already tried but didn't work TOO well.

  • I tried to use circle hough transform, but that requires me to guess the radius of the pupil, which is a bit problematic. Also, due to distortions, the pupil is not always exactly a circle, which may make this approach harder still.
  • I tried thresholding the image based on pixel brightness and using regionprops MATLAB function to look for a region of roughly (say) 200 pixel area with very low eccentricity (i.e. as circular as possible). However, this is very sensitive to the threshold value, and some images of the eye are brighter than others based on the lighting conditions. (Note the 4 samples below are mean-normalized already, and still one of the images is brighter than others overall probably because of some very dark random pixel somewhere)

Any comments/suggestions would be appreciated!

EDIT: thanks for the comment Stargazer. The algorithm should ideally be able to determine that the pupil is not in the image, as is the case for the last sample. It's not a big deal if I lose track of it for a while. It's much worse if it gives me wrong answer though.

alt text

+1  A: 

Have you considered using haarcascades (http://en.wikipedia.org/wiki/Viola-Jones_object_detection_framework) or local binary patterns? (http://en.wikipedia.org/wiki/Local_binary_patterns).

OpenCV provides very easy ways to train these kind of classifiers.

max
+1  A: 

In opencv there already haar cascades that were trained to detect eyes. On Unix systems when u install opencv they are saved to:

/usr/local/share/opencv/haarcascades

Then you center use these cascades with find objects function in opencv

Alex

Alex
+2  A: 

I'm not sure if this can help you, because you are using a dataset and I don't know your flexibility/needs to change the capture device. Just in case, let's go.

Morimoto et al. use a nice camera trick. They created a camera with two sets of infra-red leds. The first set is put near the camera lenses. The second one is put far from the lenses. Using different frequencies, the two leds sets are turned on in different moments.

Retina will reflect the light from the set near the camera lenses (that is the same thing about the red eye problem in photography), producing a bright pupil. The other set of leds will produce a dark pupil. Compare the results. So, simple difference between the two images give you a near perfect pupil. Take a look in the way that Morimoto et al. explore the glint (nice to approach sight direction).

TH
Thanks, but unfortunately I don't have access to the physical setup, I only got the data and need to run some analysis. The data does come with tracking results, but I thought I could come up with something better/smoother. Turns out the problem is more difficult than I had originally anticipated :)
karpathy