HeatmapSharp 0.0.3

dotnet add package HeatmapSharp --version 0.0.3
NuGet\Install-Package HeatmapSharp -Version 0.0.3
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="HeatmapSharp" Version="0.0.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add HeatmapSharp --version 0.0.3
#r "nuget: HeatmapSharp, 0.0.3"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install HeatmapSharp as a Cake Addin
#addin nuget:?package=HeatmapSharp&version=0.0.3

// Install HeatmapSharp as a Cake Tool
#tool nuget:?package=HeatmapSharp&version=0.0.3

HeatmapSharp a dotnet based image heat mapping helper built on ImageSharp

  • Not as good as any python implementation built with matplotlib and numpy
  • This doesn't have any smart mapping features because i am not an image expert. And only way to get smart mapping features is to use python libraries in dotnet using Python.NET. Which means the runtime is dependent on python and it can break any dotnet docker builds. So python in dotnet is a no go.
  • The basic mapping is done if a set of points are given and the image is inputted.
  • External dependency

Features

  • Map a heatmap to an Image when the image and the points are given. That's it.

Progress

  • Basic image heat mapping.
  • Retrieve color maps from asset images.
  • Make the image processing faster by using the low level image processing layer from ImageSharp.
  • Make the mapping faster by understanding point density on point locations.
  • optimize the jet based color pallet have more color points and use a color image for it.

Usage

  • Import the image mapper
using HeatmapSharp.ImageMapper;
  • Create a instance of HeatMapper
/* 
HeatMapper is configurable with 
HeatMapper(int pointDiameter, float pointStrength, float opacity, string colors) 
*/

/* 
pointDiameter is an integer of the the diameter of the marking point
default pointDiameter = 50 which is 50px (1 = 1px)
*/

/* 
pointStrength is an float from 0-1 marks the strength or opacity of the point
default pointOpacity 0.2f
*/

/* 
opacity is an float from 0-1 is the opacity of the heatmap overlay on the original image
default opacity 0.65f
*/

/* 
colors is the heatmap color format used to color the heatmap
there are two formats "default" and "reveal"
if not set explicitly it will be "default"
- "default" is a jet style rainbow color map
- "reveal" is a dark and light style color map  
*/

HeatMapper heatMapper = new HeatMapper(50, 0.2f, 0.65f, "default");
  • Use the ImageToHeatMap method to heatmap an image
// pass the image and the points to ImageToHeatMap(image, points)
// image is a Image<Rgba32> type image from ImageSharp
// points are an IEnumerable<PointModel> of points

Image<Rgba32> heatmap = heatMapper.ImageToHeatMap();

Change Log

  • v0.0.1

    • Dependency Update
      • used ImageSharp v3.0.1
  • v0.0.2

    • Dependency Update
      • ImageSharp update to v3.0.2
    • Bug Fix
      • Fixed issue where if a point goes out of bound in an image it raises a exception. Fixed it to omit the point that goes out of bound in the mapping process
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.0.3 130 10/4/2023
0.0.2 110 9/4/2023
0.0.1 152 8/28/2023