INNER CODE UNIT · Python
y_ratio
vardanagarwal/Proctoring-AI · eye_tracker.py:46
y_ratio = (cy - end_points[1])/(end_points[3] - cy)
if x_ratio > 3:
return 1
elif x_ratio < 0.33:
return 2
elif y_ratio < 0.33:
return 3
else:
return 0
def contouring(thresh, mid, img, end_points, right=False):
"""
Find the largest contour on an image divided by a midpoint and subsequently the eye position
Parameters
----------
thresh : Array of uint8