aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/argaze/utils/demo_gaze_analysis_run.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/argaze/utils/demo_gaze_analysis_run.py b/src/argaze/utils/demo_gaze_analysis_run.py
index 5f58349..bd11ad5 100644
--- a/src/argaze/utils/demo_gaze_analysis_run.py
+++ b/src/argaze/utils/demo_gaze_analysis_run.py
@@ -100,16 +100,18 @@ def main():
# Iterate over columns (destinations)
for to_aoi, probability in row.items():
- if from_aoi != to_aoi and probability > 0.0:
+ if from_aoi != GazeFeatures.OutsideAOI and to_aoi != GazeFeatures.OutsideAOI:
- from_center = ar_frame.layers["demo_layer"].aoi_scene[from_aoi].center.astype(int)
- to_center = ar_frame.layers["demo_layer"].aoi_scene[to_aoi].center.astype(int)
- start_line = (0.5 * from_center + 0.5 * to_center).astype(int)
+ if from_aoi != to_aoi and probability > 0.0:
- color = [int(probability*200) + 55, int(probability*200) + 55, int(probability*200) + 55]
+ from_center = ar_frame.layers["demo_layer"].aoi_scene[from_aoi].center.astype(int)
+ to_center = ar_frame.layers["demo_layer"].aoi_scene[to_aoi].center.astype(int)
+ start_line = (0.5 * from_center + 0.5 * to_center).astype(int)
- cv2.line(frame_image, start_line, to_center, color, int(probability*10) + 2)
- cv2.line(frame_image, from_center, to_center, [55, 55, 55], 2)
+ color = [int(probability*200) + 55, int(probability*200) + 55, int(probability*200) + 55]
+
+ cv2.line(frame_image, start_line, to_center, color, int(probability*10) + 2)
+ cv2.line(frame_image, from_center, to_center, [55, 55, 55], 2)
except KeyError:
pass