diff options
-rw-r--r-- | src/argaze/GazeFeatures.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/argaze/GazeFeatures.py b/src/argaze/GazeFeatures.py index de30735..d7fcb1a 100644 --- a/src/argaze/GazeFeatures.py +++ b/src/argaze/GazeFeatures.py @@ -44,6 +44,7 @@ class GazePosition(): def __array__(self): """Cast as numpy array.""" + return numpy.array(self.value) @property @@ -57,12 +58,14 @@ class GazePosition(): if self.valid: + int_value = (int(self.value[0]), int(self.value[1])) + # Draw point at position - cv.circle(frame, self.value, 2, color, -1) + cv.circle(frame, int_value, 2, color, -1) # Draw accuracy circle if self.accuracy > 0: - cv.circle(frame, self.value, round(self.accuracy), color, 1) + cv.circle(frame, int_value, round(self.accuracy), color, 1) class UnvalidGazePosition(GazePosition): """Unvalid gaze position.""" |