aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThéo de la Hogue2023-07-12 14:26:11 +0200
committerThéo de la Hogue2023-07-12 14:26:11 +0200
commite6e902b9a054eacfb1c0a2eeb11dcd9040245402 (patch)
tree6a1965fb65bcb0512c4423b6817621aabc375b38
parent1ca28396352fd122bcaa1128723dae9553df7a70 (diff)
downloadargaze-e6e902b9a054eacfb1c0a2eeb11dcd9040245402.zip
argaze-e6e902b9a054eacfb1c0a2eeb11dcd9040245402.tar.gz
argaze-e6e902b9a054eacfb1c0a2eeb11dcd9040245402.tar.bz2
argaze-e6e902b9a054eacfb1c0a2eeb11dcd9040245402.tar.xz
Adding basic metric plugin for AOI scan path.
-rw-r--r--src/argaze/utils/demo_environment/demo_gaze_features_setup.json2
-rw-r--r--src/argaze/utils/demo_gaze_features_run.py12
2 files changed, 14 insertions, 0 deletions
diff --git a/src/argaze/utils/demo_environment/demo_gaze_features_setup.json b/src/argaze/utils/demo_environment/demo_gaze_features_setup.json
index 634d8e4..fbf0bec 100644
--- a/src/argaze/utils/demo_environment/demo_gaze_features_setup.json
+++ b/src/argaze/utils/demo_environment/demo_gaze_features_setup.json
@@ -14,6 +14,7 @@
}
},
"scan_path_analyzers": {
+ "Basic": {},
"KCoefficient": {},
"NearestNeighborIndex": {
"size": [1920, 1149]
@@ -23,6 +24,7 @@
}
},
"aoi_scan_path_analyzers": {
+ "Basic": {},
"TransitionMatrix": {},
"KCoefficient": {},
"LempelZivComplexity": {},
diff --git a/src/argaze/utils/demo_gaze_features_run.py b/src/argaze/utils/demo_gaze_features_run.py
index 915513b..8f056da 100644
--- a/src/argaze/utils/demo_gaze_features_run.py
+++ b/src/argaze/utils/demo_gaze_features_run.py
@@ -122,6 +122,18 @@ def main():
except KeyError:
pass
+ # Display aoi scan path basic metrics analysis if loaded
+ try:
+
+ basic_analyzer = ar_frame.aoi_scan_path_analyzers["Basic"]
+
+ # Write basic analysis
+ cv2.putText(frame_image, f'Step number: {basic_analyzer.steps_number}', (20, ar_frame.size[1]-440), cv2.FONT_HERSHEY_SIMPLEX, 1, (0, 255, 255), 1, cv2.LINE_AA)
+ cv2.putText(frame_image, f'Step fixation duration average: {int(basic_analyzer.step_fixation_durations_average)} ms', (20, ar_frame.size[1]-400), cv2.FONT_HERSHEY_SIMPLEX, 1, (0, 255, 255), 1, cv2.LINE_AA)
+
+ except KeyError:
+ pass
+
# Display scan path K Coefficient analysis if loaded
try: