Skip to content

Commit

Permalink
Merge pull request #2008 from pupil-labs/fix-cv-eye-crash
Browse files Browse the repository at this point in the history
Prevent eye window crash from ellipse2Poly issues
  • Loading branch information
papr authored Sep 8, 2020
2 parents e0ab2c3 + 9fca8eb commit 008d906
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,16 @@ def draw_ellipse(
# Known issues:
# - There are reports of negative eye_ball axes when drawing the 3D eyeball
# outline, which will raise cv2.error. TODO: Investigate cause in detectors.
# - There was a case where all values in the ellipse where 'NaN', which raises
# ValueError: cannot convert float NaN to integer. TODO: Investigate how we
# even got here, since calls to this function are confidence-gated!
logger.debug(
"Error drawing ellipse! Skipping...\n"
f"ellipse: {ellipse}\n"
f"{type(e)}: {e}"
f"Ellipse: {ellipse}\n"
f"Color: {rgba}\n"
f"Error: {type(e)}: {e}"
)
return

draw_polyline(pts, thickness, RGBA(*rgba))
if draw_center:
Expand Down

0 comments on commit 008d906

Please sign in to comment.