INNER CODE UNIT · Python
process_thresh
vardanagarwal/Proctoring-AI · eye_tracker.py:98
def process_thresh(thresh):
"""
Preprocessing the thresholded image
Parameters
----------
thresh : Array of uint8
Thresholded image to preprocess
Returns
-------
thresh : Array of uint8
Processed thresholded image
"""
thresh = cv2.erode(thresh, None, iterations=2)
thresh = cv2.dilate(thresh, None, iterations=4)
thresh = cv2.medianBlur(thresh, 3)