From ce43c0e9f100aa0eaec2f39a258e92ffc5cc44a8 Mon Sep 17 00:00:00 2001 From: Théo de la Hogue Date: Wed, 5 Jul 2023 17:58:03 +0200 Subject: Adding ignored gaze positions buffer. --- src/argaze/ArFeatures.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/argaze/ArFeatures.py b/src/argaze/ArFeatures.py index 09edc6c..5604a1d 100644 --- a/src/argaze/ArFeatures.py +++ b/src/argaze/ArFeatures.py @@ -772,6 +772,9 @@ class ArEnvironment(): # Init a lock to share AOI scene projections into camera frame between multiple threads self.__camera_frame_lock = threading.Lock() + # Define public timestamp buffer to store ignored gaze positions + self.ignored_gaze_positions = GazeFeatures.TimeStampedGazePositions() + @classmethod def from_dict(self, environment_data, working_directory: str = None) -> ArEnvironmentType: @@ -991,8 +994,10 @@ class ArEnvironment(): # Can't use camera frame when it is locked if self.__camera_frame_lock.locked(): - #TODO: Store ignored timestamped gaze positions for further projections - print('Ignoring ', timestamp, gaze_position) + # TODO: Store ignored timestamped gaze positions for further projections + # PB: This would imply to also store frame projections !!! + self.ignored_gaze_positions[timestamp] = gaze_position + return # Lock camera frame exploitation -- cgit v1.1