Skip to content

Commit

Permalink
Added landmark attribute to eye object
Browse files Browse the repository at this point in the history
Added "landmark_points" attribute to the eye object to enable access to the six landmark points using the object
  • Loading branch information
keshariS authored Jul 2, 2021
1 parent e935888 commit b6fcff0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gaze_tracking/eye.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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]
Expand Down

0 comments on commit b6fcff0

Please sign in to comment.