#能在示意点显示热力图的程序
from heatmappy import Heatmapper
from PIL import Image
example_points = [(200, 100), (200, 125), (500, 150), (450, 125),(400, 400), (400, 200)]
example_img_path = '12.jpg'
example_img = Image.open(example_img_path)
heatmapper = Heatmapper(point_diameter=150,point_strength=1)
heatmap = heatmapper.heatmap_on_img(example_points, example_img)
heatmap.save('heatmap.png')
参考文章:GitHub - LumenResearch/heatmappy: Draw image and video heatmaps in python