aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/argaze/utils/tobii_segment_gaze_movements_export.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/argaze/utils/tobii_segment_gaze_movements_export.py b/src/argaze/utils/tobii_segment_gaze_movements_export.py
index 8babf36..257f875 100644
--- a/src/argaze/utils/tobii_segment_gaze_movements_export.py
+++ b/src/argaze/utils/tobii_segment_gaze_movements_export.py
@@ -302,6 +302,8 @@ def main():
if unknown_exist:
current_unknown_ts, current_unknown = ts_unknown.pop_first()
+ ts_last = 0
+
# Iterate on video frames
for video_ts, video_frame in tobii_segment_video.frames():
@@ -398,9 +400,12 @@ def main():
next_gaze_status.draw(visu_matrix)
next_gaze_status.draw(gaze_status_matrix)
- # Write last gaze status
- cv.putText(visu_matrix, str(next_gaze_status.value), next_gaze_status.value, cv.FONT_HERSHEY_SIMPLEX, 1, (0, 255, 255), 1, cv.LINE_AA)
-
+ # Write last next gaze status
+ if ts_next != ts_last:
+
+ cv.putText(visu_matrix, str(next_gaze_status.value), next_gaze_status.value, cv.FONT_HERSHEY_SIMPLEX, 1, (0, 255, 255), 1, cv.LINE_AA)
+ ts_last = ts_next
+
# Empty gaze position
except IndexError:
pass