From c4552e04e1271a9210a934233beae5be1943d034 Mon Sep 17 00:00:00 2001 From: Théo de la Hogue Date: Wed, 7 Jun 2023 14:34:14 +0200 Subject: Writing User guide and use cases section. --- docs/user_guide/areas_of_interest/aoi_frame.md | 43 ++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 docs/user_guide/areas_of_interest/aoi_frame.md (limited to 'docs/user_guide/areas_of_interest/aoi_frame.md') diff --git a/docs/user_guide/areas_of_interest/aoi_frame.md b/docs/user_guide/areas_of_interest/aoi_frame.md new file mode 100644 index 0000000..855e302 --- /dev/null +++ b/docs/user_guide/areas_of_interest/aoi_frame.md @@ -0,0 +1,43 @@ +--- +title: AOI frame +--- + +AOI Frame +========= + +[AOIFeatures](/argaze/#argaze/AreaOfInterest.AOIFeatures) provides [AOIFrame](/argaze/#argaze/AreaOfInterest.AOIFeatures.AOIFrame) class to draw into an 2D AOI. + +## Point spread + +The **point_spread** method draw a gaussian point spread into the frame 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 an AOI +aoi = AOIFeatures.AreaOfInterest([[0, 0], [1, 0], [1, 1], [0, 1]]) + +# Create AOIFrame related to this AOI with 800px * 600px resolution +aoi_frame = AOIFeatures.AOIFrame(aoi, (800, 600)) + +# Initialize heatmap +aoi_frame.heatmap_init() + +# Assuming a pointer position (x, y) is moving inside frame +...: + + # Update heatmap at pointer position + aoi_frame.heatmap_update((x, y), sigma=0.05) + + # Do something with heatmap picture + ... aoi_frame.heatmap + +``` \ No newline at end of file -- cgit v1.1