From 31df32870f06460be8069c171cb032f5aa74a098 Mon Sep 17 00:00:00 2001 From: Théo de la Hogue Date: Wed, 30 Aug 2023 23:15:59 +0200 Subject: More documention about gaze analysis pipeline. --- docs/user_guide/gaze_analysis_pipeline/heatmap.md | 24 ++++++++++------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'docs/user_guide/gaze_analysis_pipeline/heatmap.md') diff --git a/docs/user_guide/gaze_analysis_pipeline/heatmap.md b/docs/user_guide/gaze_analysis_pipeline/heatmap.md index 35674a1..a741810 100644 --- a/docs/user_guide/gaze_analysis_pipeline/heatmap.md +++ b/docs/user_guide/gaze_analysis_pipeline/heatmap.md @@ -5,11 +5,11 @@ Heatmap is an optional [ArFrame](../../argaze.md/#argaze.ArFeatures.ArFrame) pip ![Heatmap](../../img/ar_frame_heatmap.png) -## Enable ArFrame heatmap +## Enable and display ArFrame heatmap -[ArFrame](../../argaze.md/#argaze.ArFeatures.ArFrame) heatmap visualization can be enabled thanks to a dedicated JSON entry. +[ArFrame.heatmap](../../argaze.md/#argaze.ArFeatures.ArFrame.heatmap) can be enabled thanks to a dedicated JSON entry. -Here is the JSON ArFrame configuration file example where heatmap visualization is enabled: +Here is the JSON ArFrame configuration file example where heatmap is enabled and displayed: ```json { @@ -20,6 +20,11 @@ Here is the JSON ArFrame configuration file example where heatmap visualization "size": [320, 180], "sigma": 0.025, "buffer": 0 + }, + ... + "image_parameters": { + ... + "heatmap_weight": 1 } } ``` @@ -56,16 +61,7 @@ The gaussian point spreading to draw at each gaze position. The size of point spread images buffer (0 means no buffering) to visualize only last N gaze positions. -## Export heatmap to PNG file - -Once timestamped gaze positions have been processed by [ArFrame.look](../../argaze.md/#argaze.ArFeatures.ArFrame.look) method, it is possible to write heatmap image thanks to OpenCV package. +### Heatmap weight -```python -import cv2 - -# Assuming that timestamped gaze positions have been processed by ArFrame.look method -... +The weight of heatmap overlay in [ArFrame.image](../../argaze.md/#argaze.ArFeatures.ArFrame.image) between 0 and 1. -# Export heatmap image -cv2.imwrite('./heatmap.png', ar_frame.heatmap.image) -``` \ No newline at end of file -- cgit v1.1