https://github.com/null-none/heat-map
Generate image heat maps in Python
https://github.com/null-none/heat-map
heatmap image image-processing python
Last synced: 18 days ago
JSON representation
Generate image heat maps in Python
- Host: GitHub
- URL: https://github.com/null-none/heat-map
- Owner: null-none
- License: mit
- Created: 2025-01-27T11:56:10.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2026-03-13T11:43:47.000Z (3 months ago)
- Last Synced: 2026-03-14T00:25:22.178Z (3 months ago)
- Topics: heatmap, image, image-processing, python
- Language: Python
- Homepage:
- Size: 163 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# heat-map
Generate image heat maps in Python
## Install
`pip install heat-map`
## Examples
#### Given some points (co-ordinates) and a base image
```python
from heat_map.heatmap import Heatmapper, _asset_file
from PIL import Image
example_points = [(120, 25), (200, 50), (60, 300), (60, 300), (60, 300), (60, 300), (60, 300), (170, 250)]
example_img = Image.open(_asset_file("area.png"))
heatmapper = Heatmapper(colours="default")
heatmapper.heatmap_on_img(example_points, example_img).save("out.png")
```

## Heatmap config
The following options are available (shown with their default values):
```python
heatmapper = Heatmapper(
point_diameter=50, # the size of each point to be drawn
point_strength=0.2, # the strength, between 0 and 1, of each point to be drawn
opacity=0.65, # the opacity of the heatmap layer
colours='default', # 'default' or 'reveal'
# OR a matplotlib LinearSegmentedColorMap object
# OR the path to a horizontal scale image
grey_heatmapper='PIL' # The object responsible for drawing the points
# Pillow used by default, 'PySide' option available if installed
)
```
### Provided colour schemes
#### default

#### reveal

## License
MIT License.