# Help please--->Method of Least Squares

• Apr 14th 2010, 09:01 AM
eduardo
Hi forum!
My name is Eduardo. I´m doing a low cost eye tracking tool. Basically I use a webcam and I move the mouse according with the user gaze direction (Nerd)
To do this I had to discover the eye pupil coordinate. Later I had to discover how to use that eye pupil coordinate to get the corresponding screen coordinate!
The first part was not difficult to achieve, but the second one is giving me a lot of headaches (Lipssealed)
Is at this point that I need your precious help!

The goal is get a matrix by calibration, and then apply it to each pupil coordinate, in order to get the screen coordinate.
Basically calibration consists in show 9 points on the screen in specific coordinates (f.ex (0,0);(600,800)...), and when the user looks to them I collect the 9 pupil coordinates measured from the eye corner (f.ex (12,34),(25,17)...). Then I construct that matrix according with the third page of the attached paper, and I apply it to each point as it says.

Everything runs as planned if the eye has a linear behavior.
The problem is that the paper assumes that the eye movement is linear, and obviously our eye don´t have that behavior (for example when you look from a point on the left to a point on the right is obvious that the path will not be always over the same y coordinate) . As the eye behavior is not linear I´ve to discover another way to do this... A colleague of mine says me that I´ve to migrate this to a non linear space...Unfortunatelly my math skills are not very deep (Worried)

Anyone could help me finding a way to do this?

Best regards and thanks for all

Eduardo

PS: sorry for my English (Rofl)
• Apr 14th 2010, 10:06 AM
TKHunny
Eyes generally move in a piecewise linear fashion, but they are attracted by "interest". Certain things along the way may distract they eye. I HOPE SO, otherwise how could we drive a car? This also makes speed other than constant. Moving your focus from one side of the screen to the other goes quickly enough, but interest and comprehension lag a little behind - again, according to various interests.

Also, we do not necessarily encounter or process all the information along the way. This was once very important to me in a dark grocery store parking lot. Walking out of the store, I quickly scanned the parking lot for anything that would make me uncomfortable. A young man and his girlfriend were walking away from me. The young man apparently saw my eyes scan the parking lot. Of course, somewhere in that scan was his girlfriend. The young man was very angry with me for "looking at" his girlfriend. Truthfully, she was in the scan, but "looking at" her was not. I was falsely accused. Tricky things, eyes.