GazeTracking icon indicating copy to clipboard operation
GazeTracking copied to clipboard

How to use it to detect pupils in pictures

Open 1554367650 opened this issue 6 years ago • 2 comments

Hello, I have used your code to detect the pupil direction in the picture, and then I can only detect the left and right sides, but not the top and bottom.The pointer of the left eye is slightly off . May I ask you to modify yours values of number of self.horizontal_ratio()?

1554367650 avatar Jul 16 '19 06:07 1554367650

Hello!

I can only detect the left and right sides, but not the top and bottom.

The detection of top/bottom is more complicated because the distance between the top and the bottom is shorter than the distance between the right and the left.

I didn't code is_top() and is_botton() but I provided a vertical_ratio() function to get the vertical position with a ratio. The extreme top is 0.0, the center is 0.5 and the extreme bottom is 1.0. However, I think the accuracy of this ratio is quite low, it depends of your usages.

The pointer of the left eye is slightly off. May I ask you to modify yours values of number of self.horizontal_ratio()

Please share with me the values that work for you!

antoinelame avatar Aug 25 '19 05:08 antoinelame

dear Antoine   Hello, I've been testing the eyes of several people on a computer program these days. Based on their results, the data were summarized. But I don't know if it's true or not.This applies to the people around me I want to share it with you!     def is_right(self):         """Returns true if the user is looking to the right"""         print("HR:",self.horizontal_ratio())         if self.pupils_located:             return self.horizontal_ratio() <= 0.542

    def is_left(self):         """Returns true if the user is looking to the left"""         print("HR:", self.horizontal_ratio())         if self.pupils_located:             return self.horizontal_ratio() >= 0.75   I think you can use it as a reference.Also, I come from China, maybe our Chinese eyes are different from your European eyes, so the Numbers are not the same! A silly question. You can explain that to me.

what do  eye_left.pupil.x  ,eye_left.pupil.y  mean?  I don't know which unit that cross represents...... Don't laugh at me... I would like to make a judgment of the upper and lower parts of the eyeball recently. Do you have any Suggestions? I think we can modify the value of the vertical_ratio to solve the question. I don't know if i can Look forward to your reply! XD   Best,Adile.

发自我的iPhone

------------------ Original ------------------ From: Antoine Lamé <[email protected]> Date: Sun,Aug 25,2019 1:25 PM To: antoinelame/GazeTracking <[email protected]> Cc: 1554367650 <[email protected]>, Author <[email protected]> Subject: Re: [antoinelame/GazeTracking] How to use it to detect pupils in pictures (#18)

Hello!

I can only detect the left and right sides, but not the top and bottom.

The detection of top/bottom is more complicated because the distance between the top and the bottom is shorter than the distance between the right and the left.

I didn't code is_top() and is_botton() but I provided a vertical_ratio() function to get the vertical position with a ratio. The extreme top is 0.0, the center is 0.5 and the extreme bottom is 1.0. However, I think the accuracy of this ratio is quite low, it depends of your usages.

The pointer of the left eye is slightly off. May I ask you to modify yours values of number of self.horizontal_ratio()

Please share with me the values that work for you!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

1554367650 avatar Sep 16 '19 04:09 1554367650