aboutsummaryrefslogtreecommitdiff
path: root/docs/user_guide/gaze_analysis_pipeline/heatmap.md
blob: 6d9ad189ce450b1f7e35aa6aa9fdecea945f5a0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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 [visualisation chapter](visualisation.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.