/Fixation-Densitymap

Generate Heatmaps from eye tracking data

Primary LanguagePythonMIT LicenseMIT

Fixation Density Map

Fast Python implementation Generating Heatmaps from eye tracking data

Requirement

  • Python == 3.6
  • OpenCV >= 3.0
  • tqdm

Usage

Open Fixpos2Densemap.py
Replace below with loading your data

fix_arr = np.random.randn(num_subjects,3)
fix_arr -= fix_arr.min()
fix_arr /= fix_arr.max()
fix_arr[:,0] *= W
fix_arr[:,1] *= H

Data shape must be number of participate x 3(x, y, fixation)
fixation can be 1

Demo

This image does not use actual human eye tracking data: this uses toy data

Other implementation

TobiasRoeddiger/GazePointHeatMap: Easy to use Python command line based tool to generate a gaze point heat map from a csv file.
jjguy/heatmap: Python module to create heatmaps