From dd7927d3db2b3bed4e1ea0387a22bb9c575f8616 Mon Sep 17 00:00:00 2001 From: "Nadia P." Date: Thu, 21 Nov 2024 11:29:19 +0200 Subject: [PATCH 1/3] update heatmaps docs - fixation based --- .../visualizations/heatmap/index.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/neon/pupil-cloud/visualizations/heatmap/index.md b/neon/pupil-cloud/visualizations/heatmap/index.md index 59a39834..06de9473 100644 --- a/neon/pupil-cloud/visualizations/heatmap/index.md +++ b/neon/pupil-cloud/visualizations/heatmap/index.md @@ -1,38 +1,38 @@ # Heatmap -The output of the [Reference Image Mapper](/pupil-cloud/enrichments/reference-image-mapper/), [Marker Mapper](/pupil-cloud/enrichments/marker-mapper/), and [Manual Mapper](/pupil-cloud/enrichments/manual-mapper/) enrichments can be visualized as a traditional heatmap. This shows you which parts of your reference image or surface were gazed at more often by an observer. +The output of the [Reference Image Mapper](/pupil-cloud/enrichments/reference-image-mapper/), [Marker Mapper](/pupil-cloud/enrichments/marker-mapper/), and [Manual Mapper](/pupil-cloud/enrichments/manual-mapper/) enrichments can be visualized as a traditional heatmap. This shows you which parts of your reference image or surface were fixated more often by an observer. For example, below and to the left is a view of a kitchen that was used as a reference image. On the right, you can see the output of the Heatmap Visualization for a recording that was made while the observer was preparing ingredients. -![An example of a heatmap from Pupil Cloud. On the left is a photo of a kitchen countertop. On the right is the same photo with a gaze heatmap overlayed.](heatmap_example.png) +![An example of a heatmap from Pupil Cloud. On the left is a photo of a kitchen countertop. On the right is the same photo with a fixation heatmap overlayed.](heatmap_example.png) -The Heatmap is a Gaussian blurred 2D histogram of gaze data from all selected recordings. No normalization for recording time is performed, so longer recordings will carry more weight and contribute more to the Heatmap. +The Heatmap is a Gaussian blurred 2D histogram of fixation data from all selected recordings. No normalization for recording time is performed, so longer recordings will carry more weight and contribute more to the Heatmap. -The colors in the heatmap range from 0 to 100%, as indicated by the color bar to the right. A value of 0% means a point was never gazed at and 100% means it had the longest gaze duration. +The colors in the heatmap range from 0 to 100%, as indicated by the color bar to the right. A value of 0% means a point was never fixated and 100% means it had the longest fixation duration. The output of the Heatmap Visualization is two image files: one image with just the Heatmap and another where it is overlayed on the reference image. :::: details Implementation Details -1. Compute the 2D histogram over the raw gaze data of all recordings. The histogram has the same aspect ratio as the reference image, with the wider side set to 300 bins: +1. Compute the 2D histogram over the raw fixation data of all recordings. The histogram has the same aspect ratio as the reference image, with the wider side set to 300 bins: ``` - gaze_histogram2d = hist2d(gaze_x, gaze_y, bins=[nbins_x, nbins_y]) + fixation_histogram2d = hist2d(fixation_x, fixation_y, bins=[nbins_x, nbins_y]) ``` 2. Apply a 2D Gaussian blur to the 2D histogram and normalize the resulting values to the maximum: ``` - gaze_heatmap = GaussianBlur(gaze_hist2d, 0.01 * scale) - gaze_heatmap /= max(gaze_heatmap) + fixation_heatmap = GaussianBlur(fixation_histogram2d, 0.01 * scale) + fixation_heatmap /= max(fixation_heatmap) ``` 3. Resize the Heatmap using Lanczos smoothing interpolation: ``` - final_heatmap = resize(gaze_heatmap, + final_heatmap = resize(fixation_heatmap, (ref_img_width, ref_img_height), interpolation=LANCZOS) ``` -:::: \ No newline at end of file +:::: From b6a6aa85cdafeb2ae6185d0afcfb5c39f100652c Mon Sep 17 00:00:00 2001 From: "Nadia P." Date: Thu, 21 Nov 2024 13:26:12 +0200 Subject: [PATCH 2/3] wording clarification --- neon/pupil-cloud/visualizations/heatmap/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neon/pupil-cloud/visualizations/heatmap/index.md b/neon/pupil-cloud/visualizations/heatmap/index.md index 06de9473..676c3e9e 100644 --- a/neon/pupil-cloud/visualizations/heatmap/index.md +++ b/neon/pupil-cloud/visualizations/heatmap/index.md @@ -6,7 +6,7 @@ For example, below and to the left is a view of a kitchen that was used as a ref ![An example of a heatmap from Pupil Cloud. On the left is a photo of a kitchen countertop. On the right is the same photo with a fixation heatmap overlayed.](heatmap_example.png) -The Heatmap is a Gaussian blurred 2D histogram of fixation data from all selected recordings. No normalization for recording time is performed, so longer recordings will carry more weight and contribute more to the Heatmap. +The Heatmap is a Gaussian blurred 2D histogram of fixation data from all selected recordings mapped to the reference image. No normalization for recording time is performed, so longer recordings will carry more weight and contribute more to the Heatmap. The colors in the heatmap range from 0 to 100%, as indicated by the color bar to the right. A value of 0% means a point was never fixated and 100% means it had the longest fixation duration. From 4e08e692c1e81aab46b36209c5008384e4b548f7 Mon Sep 17 00:00:00 2001 From: "Neil M. Thomas" Date: Tue, 26 Nov 2024 14:57:57 +0800 Subject: [PATCH 3/3] Update neon/pupil-cloud/visualizations/heatmap/index.md --- neon/pupil-cloud/visualizations/heatmap/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neon/pupil-cloud/visualizations/heatmap/index.md b/neon/pupil-cloud/visualizations/heatmap/index.md index 676c3e9e..e96d47f3 100644 --- a/neon/pupil-cloud/visualizations/heatmap/index.md +++ b/neon/pupil-cloud/visualizations/heatmap/index.md @@ -14,7 +14,7 @@ The output of the Heatmap Visualization is two image files: one image with just :::: details Implementation Details -1. Compute the 2D histogram over the raw fixation data of all recordings. The histogram has the same aspect ratio as the reference image, with the wider side set to 300 bins: +1. Compute the 2D histogram over the fixation data of all selected recordings. The histogram has the same aspect ratio as the reference image, with the wider side set to 300 bins: ``` fixation_histogram2d = hist2d(fixation_x, fixation_y, bins=[nbins_x, nbins_y])