diff options
author | Théo de la Hogue | 2023-05-09 18:00:17 +0200 |
---|---|---|
committer | Théo de la Hogue | 2023-05-09 18:00:17 +0200 |
commit | 772fd8e9d076e256cdde9e7b7c81c7a101714442 (patch) | |
tree | f6840f3d1529f8b4e8dd66d47ddab24f229d6a4a | |
parent | b4d8bed97612dc57cd9f4df97133bad193f43e7b (diff) | |
download | argaze-772fd8e9d076e256cdde9e7b7c81c7a101714442.zip argaze-772fd8e9d076e256cdde9e7b7c81c7a101714442.tar.gz argaze-772fd8e9d076e256cdde9e7b7c81c7a101714442.tar.bz2 argaze-772fd8e9d076e256cdde9e7b7c81c7a101714442.tar.xz |
Using new visual scan interface.
-rw-r--r-- | src/argaze/utils/demo_gaze_features_run.py | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/argaze/utils/demo_gaze_features_run.py b/src/argaze/utils/demo_gaze_features_run.py index 0efb232..8e8c282 100644 --- a/src/argaze/utils/demo_gaze_features_run.py +++ b/src/argaze/utils/demo_gaze_features_run.py @@ -37,9 +37,10 @@ def main(): window_name = "AOI Scene" cv2.namedWindow(window_name, cv2.WINDOW_AUTOSIZE) - # Init gaze movement identification + # Init gaze movements processing gaze_position = GazeFeatures.GazePosition() gaze_movement_identifier = DispersionBasedGazeMovementIdentifier.GazeMovementIdentifier(args.deviation_max_threshold, args.duration_min_threshold) + visual_scan = GazeFeatures.VisualScan() gaze_movement_lock = threading.Lock() # Init timestamp @@ -69,6 +70,7 @@ def main(): if isinstance(gaze_movement, DispersionBasedGazeMovementIdentifier.Fixation): # Does the fixation match an AOI? + look_at = 'Screen' for name, aoi in aoi_scene_projection.items(): _, _, circle_ratio = aoi.circle_intersection(gaze_movement.centroid, args.deviation_max_threshold) @@ -77,8 +79,16 @@ def main(): if name != 'Screen': - print(f'{data_ts}: gaze step on {name} aoi') - #gaze_step = GazeStep(gaze_movement, name) + look_at = name + break + + # Append fixation to visual scan + new_arc = visual_scan.append_fixation(data_ts, gaze_movement, look_at) + + if isinstance(gaze_movement, DispersionBasedGazeMovementIdentifier.Saccade): + + # Append saccade to visual scan + visual_scan.append_saccade(data_ts, gaze_movement) # Unlock gaze movement exploitation gaze_movement_lock.release() |