aboutsummaryrefslogtreecommitdiff
path: root/docs/user_guide/areas_of_interest/heatmap.md
blob: 6142c5f20f3ced13eca2ad295339fea355dcafef (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
---
title: Heatmap
---

Heatmap
=========

[AOIFeatures](../../../argaze/#argaze.AreaOfInterest.AOIFeatures) provides [Heatmap](../../../argaze/#argaze.AreaOfInterest.AOIFeatures.Heatmap) class to draw heatmap image.

## Point spread

The **point_spread** method draw a gaussian point spread into heatmap image at a given pointer position.

![Point spread](../../img/point_spread.png)

## Heatmap

Heatmap visualisation allows to show where a pointer is most of the time.

![Heatmap](../../img/heatmap.png)

```python
from argaze.AreaOfInterest import AOIFeatures

# Create heatmap of 800px * 600px resolution
heatmap = AOIFeatures.Heatmap((800, 600))

# Initialize heatmap
heatmap.init()

# Assuming a pointer position (x, y) is moving inside frame
...:

	# Update heatmap at pointer position
	heatmap.update((x, y), sigma=0.05)

	# Do something with heatmap image
	... heatmap.image

```