From 245e9dcf53a16538677f26353457067b8adf68f8 Mon Sep 17 00:00:00 2001 From: Théo de la Hogue Date: Tue, 11 Jul 2023 11:05:44 +0200 Subject: Drawing fixation borders as long as its duration in seconds. --- src/argaze/GazeAnalysis/DispersionThresholdIdentification.py | 2 +- src/argaze/GazeAnalysis/VelocityThresholdIdentification.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/argaze/GazeAnalysis/DispersionThresholdIdentification.py b/src/argaze/GazeAnalysis/DispersionThresholdIdentification.py index 5dd582d..34be490 100644 --- a/src/argaze/GazeAnalysis/DispersionThresholdIdentification.py +++ b/src/argaze/GazeAnalysis/DispersionThresholdIdentification.py @@ -82,7 +82,7 @@ class Fixation(GazeFeatures.Fixation): """Draw fixation into image.""" cv2.circle(image, (int(self.focus[0]), int(self.focus[1])), int(self.deviation_max), color, -1) - cv2.circle(image, (int(self.focus[0]), int(self.focus[1])), int(self.deviation_max), border_color, len(self.positions)) + cv2.circle(image, (int(self.focus[0]), int(self.focus[1])), int(self.deviation_max), border_color, int(self.duration*1e-3)) @dataclass(frozen=True) class Saccade(GazeFeatures.Saccade): diff --git a/src/argaze/GazeAnalysis/VelocityThresholdIdentification.py b/src/argaze/GazeAnalysis/VelocityThresholdIdentification.py index 4f79b7e..fa38edf 100644 --- a/src/argaze/GazeAnalysis/VelocityThresholdIdentification.py +++ b/src/argaze/GazeAnalysis/VelocityThresholdIdentification.py @@ -82,7 +82,7 @@ class Fixation(GazeFeatures.Fixation): """Draw fixation into image.""" cv2.circle(image, (int(self.focus[0]), int(self.focus[1])), int(self.deviation_max), color, -1) - cv2.circle(image, (int(self.focus[0]), int(self.focus[1])), int(self.deviation_max), border_color, len(self.positions)) + cv2.circle(image, (int(self.focus[0]), int(self.focus[1])), int(self.deviation_max), border_color, int(self.duration*1e-3)) @dataclass(frozen=True) class Saccade(GazeFeatures.Saccade): -- cgit v1.1