Skip to content

Repository files navigation

Heatmap Generator

using Scipy to draw heatmaps from arbitrary sensor locations and values.

generate training data

input image:
temperature

recovering numerical values from JET gradient (reverse_colormap.py)

python reverse_colormap.py --image images/temperature.png --cmap jet --output images/temperature_values.png

temperature_values

validating by re-applying JET for comparison

temperature_check

sampling numerical values at random positions

and scaling them to given [min, max] range (sample_from_map.py)

python sample_from_map.py --image images/temperature_values.png --samples 1000 --range -20 40

colormap is applied only for visualisation. sample_from_map

create maps from data (heatmap.py)

python heatmap.py --sensors data/sensors.json --values data/values.json --cmap JET --width 1024 --height 530 --interpolation linear --blur 3

nearest neighbor w/o color mapping: (1000 samples) linear

nearest neighbor with "VIRIDIS": (1000 samples) linear

linear interpolation with "JET": (10k samples) linear

linear interpolation with "INFERNO": (10k samples) linear

run in virtualenv:

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python heatmap.py # ..

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages