[go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZeroDivisionError: float division by zero in detect_iris #7

Closed
llinjupt opened this issue Mar 20, 2019 · 1 comment
Closed

ZeroDivisionError: float division by zero in detect_iris #7

llinjupt opened this issue Mar 20, 2019 · 1 comment

Comments

@llinjupt
Copy link
llinjupt commented Mar 20, 2019

@antoinelame THX for your awesome job first. But when I try example.py the log gives me the error:

Traceback (most recent call last): File "example.py", line 18, in <module> gaze.refresh(frame) File "C:\Users\Red\.spyder\dolist\pyimage\GazeTracking\gaze_tracking\gaze_tracking.py", line 64, in refresh self._analyze() File "C:\Users\Red\.spyder\dolist\pyimage\GazeTracking\gaze_tracking\gaze_tracking.py", line 51, in _analyze self.eye_right = Eye(frame, landmarks, 1, self.calibration) File "C:\Users\Red\.spyder\dolist\pyimage\GazeTracking\gaze_tracking\eye.py", line 22, in __init__ self._analyze(original_frame, landmarks, side, calibration) File "C:\Users\Red\.spyder\dolist\pyimage\GazeTracking\gaze_tracking\eye.py", line 112, in _analyze self.pupil = Pupil(self.frame, threshold) File "C:\Users\Red\.spyder\dolist\pyimage\GazeTracking\gaze_tracking\pupil.py", line 17, in __init__ self.detect_iris(eye_frame) File "C:\Users\Red\.spyder\dolist\pyimage\GazeTracking\gaze_tracking\pupil.py", line 51, in detect_iris self.x = int(moments['m10'] / moments['m00']) ZeroDivisionError: float division by zero

OpenCV 3.1.0. BTW in eye.py line 86 may have the same issue, but I can't repeat it again and so the log lost.

@antoinelame
Copy link
Owner

Hi @llinjupt
Well spotted, thank you! I fixed it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants