From 1cd915f9632f9138986749587ea6e9bfcb6f3b97 Mon Sep 17 00:00:00 2001 From: Théo de la Hogue Date: Wed, 21 Jun 2023 15:57:07 +0200 Subject: Renaming AOIFrame in Heatmap. Adding new ArScreen class. --- docs/user_guide/areas_of_interest/heatmap.md | 40 ++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 docs/user_guide/areas_of_interest/heatmap.md (limited to 'docs/user_guide/areas_of_interest/heatmap.md') diff --git a/docs/user_guide/areas_of_interest/heatmap.md b/docs/user_guide/areas_of_interest/heatmap.md new file mode 100644 index 0000000..6142c5f --- /dev/null +++ b/docs/user_guide/areas_of_interest/heatmap.md @@ -0,0 +1,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 + +``` \ No newline at end of file -- cgit v1.1