Add a heatmap ============= Heatmap is an optional [ArFrame](../../argaze.md/#argaze.ArFeatures.ArFrame) pipeline step. It is executed at each new gaze position to update heatmap image. ![Heatmap](../../img/heatmap.png) ## Enable and display ArFrame heatmap [ArFrame.heatmap](../../argaze.md/#argaze.ArFeatures.ArFrame.heatmap) can be enabled thanks to a dedicated JSON entry. Here is an extract from the JSON ArFrame configuration file where heatmap is enabled and displayed: ```json { "name": "My FullHD screen", "size": [1920, 1080], ... "heatmap": { "size": [320, 180], "sigma": 0.025, "buffer": 0 }, ... "image_parameters": { ... "heatmap_weight": 1 } } ``` !!! note [ArFrame.heatmap](../../argaze.md/#argaze.ArFeatures.ArFrame.heatmap) is automatically updated each time the [ArFrame.look](../../argaze.md/#argaze.ArFeatures.ArFrame.look) method is called. As explained in [visualization chapter](visualization.md), the resulting image is accessible thanks to [ArFrame.image](../../argaze.md/#argaze.ArFeatures.ArFrame.image) method. Now, let's understand the meaning of each JSON entry. ### *size* The heatmap image size in pixel. Higher size implies higher CPU load. ### *sigma* The gaussian point spreading to draw at each gaze position. ![Point spread](../../img/point_spread.png) ### *buffer* The size of point spread images buffer (0 means no buffering) to visualize only last N gaze positions. ### *heatmap_weight* The weight of heatmap overlay in [ArFrame.image](../../argaze.md/#argaze.ArFeatures.ArFrame.image) between 0 and 1.