gaze display

asked 2016-12-14 15:55:54 -0600

atv gravatar image

I'm trying to create a line from a pupil into the screen, pointing in the direction where the pupil is pointing. A gaze detector if you will.

But for some reason i can only get the line end that terminates on the pupil to move, not the other end (which is what i want). It doesn't matter if i switch both Point() arguments to line() around.

line(image,rightpupil,rightpupil+cv::Point(-15,-2),CV_RGB(255,5,255),2,8,0,0.5); line(image,leftpupil,leftpupil+cv::Point(-15,-2),CV_RGB(255,5,255),2,8,0);

Is this a code thing or am i doing something wrong ?

edit retag flag offensive close merge delete

Comments

Point(-15,2) is fixed.

(while you probably want to extrapolate the line from the center of the eyball through the center of the pupil)

berak gravatar imageberak ( 2016-12-14 22:03:12 -0600 )edit

My code is loosely based on https://github.com/trishume/eyeLike, do you mind having a look at that? I replaced the circle functions in main.cpp with a line function.

I have the eyecenter, and the pupil movement, so i should be able to get this working.

atv gravatar imageatv ( 2016-12-15 03:48:22 -0600 )edit

maybe using faciallandmarks to acquire the eye-corners/center might belp.

berak gravatar imageberak ( 2016-12-15 03:57:55 -0600 )edit

I can give it a go, i had hoped the software had all that included already. I mean it clearly has the position of the pupil (which gets its position from findEyeCenter) so i thought it wouldnt be to hard to find a stable reference point.

Either clandmark or maybe just redetect the eyes with a cascade and using that?

atv gravatar imageatv ( 2016-12-15 06:16:15 -0600 )edit

cascade detection for eyes is not accurate at all. if you're happy with what eyeLike delivers, stick with that.

else, clandmark, dlib, or FaceX have quite accurate eye landmarks

berak gravatar imageberak ( 2016-12-15 06:20:31 -0600 )edit

Hi, so did you manage to do this?

nicolemunits gravatar imagenicolemunits ( 2018-02-26 10:07:38 -0600 )edit