aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/argaze/GazeFeatures.py19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/argaze/GazeFeatures.py b/src/argaze/GazeFeatures.py
index 65afdf8..14d4f62 100644
--- a/src/argaze/GazeFeatures.py
+++ b/src/argaze/GazeFeatures.py
@@ -274,6 +274,11 @@ class GazeMovement():
# Draw movement from start to next
cv2.line(image, (int(start_gaze_position[0]), int(start_gaze_position[1])), (int(next_gaze_position[0]), int(next_gaze_position[1])), color, 1)
+ def draw(self, image: numpy.array, color):
+ """Draw gaze movement into image."""
+
+ raise NotImplementedError('draw() method not implemented')
+
class UnvalidGazeMovement(GazeMovement):
"""Unvalid gaze movement."""
@@ -283,6 +288,10 @@ class UnvalidGazeMovement(GazeMovement):
super().__init__([])
+ def draw(self, image: numpy.array, color):
+
+ pass
+
FixationType = TypeVar('Fixation', bound="Fixation")
# Type definition for type annotation convenience
@@ -301,11 +310,6 @@ class Fixation(GazeMovement):
raise NotImplementedError('merge() method not implemented')
- def draw(self, image: numpy.array, color):
- """Draw fixation into image."""
-
- raise NotImplementedError('draw() method not implemented')
-
def is_fixation(gaze_movement):
"""Is a gaze movement a fixation?"""
@@ -318,11 +322,6 @@ class Saccade(GazeMovement):
super().__post_init__()
- def draw(self, image: numpy.array, color):
- """Draw saccade into image."""
-
- raise NotImplementedError('draw() method not implemented')
-
def is_saccade(gaze_movement):
"""Is a gaze movement a saccade?"""