aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThéo de la Hogue2023-06-21 16:05:50 +0200
committerThéo de la Hogue2023-06-21 16:05:50 +0200
commit601f8887f563afecc7e2898755309f9b1272e3ff (patch)
treea2100c5c7f5b5adad194e396ada6e0e23cebdcb2
parent1cd915f9632f9138986749587ea6e9bfcb6f3b97 (diff)
downloadargaze-601f8887f563afecc7e2898755309f9b1272e3ff.zip
argaze-601f8887f563afecc7e2898755309f9b1272e3ff.tar.gz
argaze-601f8887f563afecc7e2898755309f9b1272e3ff.tar.bz2
argaze-601f8887f563afecc7e2898755309f9b1272e3ff.tar.xz
Fixing demo gaze features.
-rw-r--r--src/argaze/utils/demo_gaze_features_run.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/argaze/utils/demo_gaze_features_run.py b/src/argaze/utils/demo_gaze_features_run.py
index 8bd0a88..2a9474f 100644
--- a/src/argaze/utils/demo_gaze_features_run.py
+++ b/src/argaze/utils/demo_gaze_features_run.py
@@ -49,7 +49,7 @@ def main():
window_size = (aoi_scene_image.shape[1], aoi_scene_image.shape[0])
# Project AOI scene onto Full HD screen
- aoi_scene_projection = demo_scene.orthogonal_projection * window_size
+ aoi_scene_projection = demo_scene.aoi_scene.orthogonal_projection * window_size
# Create a window to display AR environment
window_name = "AOI Scene"
@@ -58,8 +58,8 @@ def main():
# Init gaze processing
gaze_position = GazeFeatures.GazePosition()
- screen_image = AOIFeatures.AOIFrame(aoi_scene_projection['Screen'], window_size)
- screen_image.heatmap_init()
+ heatmap = AOIFeatures.Heatmap(window_size)
+ heatmap.init()
enable_heatmap = False
clear_heatmap = False
@@ -150,11 +150,11 @@ def main():
# Clear heatmap
if clear_heatmap:
- screen_image.heatmap_init(10 if enable_heatmap_buffer else 0)
+ heatmap.init(10 if enable_heatmap_buffer else 0)
clear_heatmap = False
# Update heatmap
- screen_image.heatmap_update(gaze_position.value, sigma=0.05)
+ heatmap.update(gaze_position.value, sigma=0.05)
else:
@@ -263,7 +263,7 @@ def main():
# Draw gaze spread heatmap
if enable_heatmap:
- image = cv2.addWeighted(screen_image.heatmap, 0.5, image, 1., 0)
+ image = cv2.addWeighted(heatmap.heatmap, 0.5, image, 1., 0)
else: