From b6fcff0eb122ff6509c4494aa47eb2722aedfda5 Mon Sep 17 00:00:00 2001 From: SHUVAM KESHARI Date: Fri, 2 Jul 2021 14:46:39 +0530 Subject: [PATCH] Added landmark attribute to eye object Added "landmark_points" attribute to the eye object to enable access to the six landmark points using the object --- gaze_tracking/eye.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gaze_tracking/eye.py b/gaze_tracking/eye.py index fe8fa64..a3efdc0 100644 --- a/gaze_tracking/eye.py +++ b/gaze_tracking/eye.py @@ -18,6 +18,7 @@ def __init__(self, original_frame, landmarks, side, calibration): self.origin = None self.center = None self.pupil = None + self.landmark_points = None self._analyze(original_frame, landmarks, side, calibration) @@ -43,6 +44,7 @@ def _isolate(self, frame, landmarks, points): """ region = np.array([(landmarks.part(point).x, landmarks.part(point).y) for point in points]) region = region.astype(np.int32) + self.landmark_points = region # Applying a mask to get only the eye height, width = frame.shape[:2]