aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/argaze/utils/tobii_segment_gaze_movements_export.py27
1 files changed, 26 insertions, 1 deletions
diff --git a/src/argaze/utils/tobii_segment_gaze_movements_export.py b/src/argaze/utils/tobii_segment_gaze_movements_export.py
index 7e184ee..1b38fd9 100644
--- a/src/argaze/utils/tobii_segment_gaze_movements_export.py
+++ b/src/argaze/utils/tobii_segment_gaze_movements_export.py
@@ -383,6 +383,31 @@ def main():
current_fixation_time_counter += 1
+ # Draw all fixation gaze positions
+ try:
+
+ # Get next fixation position
+ ts_next, _ = current_fixation.positions.first
+
+ # Check next fixation positions is not after current time
+ while ts_next < video_ts:
+
+ ts_start, start_gaze_position = current_fixation.positions.pop_first()
+ ts_next, next_gaze_position = current_fixation.positions.first
+
+ # Draw movement
+ if start_gaze_position.valid and next_gaze_position.valid:
+
+ int_start_position = (int(start_gaze_position[0]), int(start_gaze_position[1]))
+ int_next_position = (int(next_gaze_position[0]), int(next_gaze_position[1]))
+
+ cv.line(visu_matrix, int_start_position, int_next_position, (0, 255, 0), 3)
+ cv.line(heatmap_matrix, int_start_position, int_next_position, (0, 255, 0), 3)
+
+ # Empty gaze position
+ except IndexError:
+ pass
+
# Draw current fixation
cv.circle(visu_matrix, (int(current_fixation.centroid[0]), int(current_fixation.centroid[1])), int(current_fixation.dispersion), (0, 255, 0), current_fixation_time_counter)
cv.circle(heatmap_matrix, (int(current_fixation.centroid[0]), int(current_fixation.centroid[1])), int(current_fixation.dispersion), (0, 255, 0))
@@ -403,7 +428,7 @@ def main():
# Get next saccade position
ts_next, _ = current_saccade.positions.first
- # Check next unknown positions is not after current time
+ # Check next saccade positions is not after current time
while ts_next < video_ts:
ts_start, start_gaze_position = current_saccade.positions.pop_first()