Skip to content

Overlay Heatmap

Overview

This node blends a color-mapped heatmap onto the input image. It allows users to visualize a heatmap directly within the context of the captured scene.

Use Overlay Heatmap when:

  • You need to visualize regions where an AI model detected an anomaly.

💡 Tip

The heatmap input is automatically resized to match the dimensions of the input image before blending.

What is a heatmap?

A heatmap is a data matrix where each pixel is assigned an intensity value. These values can be mapped to a color gradient, highlighting areas of interest such as potential anomalies.

In computer vision, heatmaps help identify defects or irregularities by overlaying these gradients onto an image, making patterns easier to spot.

Heatmap overlay example
A heatmap overlay highlights anomalous regions on an image using a color gradient.

Image source

Inputs

NameTypeDescription
imageimageThe original background image.
heatmapimageThe heatmap data to be overlayed. Single channel image is expected

Outputs

NameTypeDescription
overlayed_heatmap_imageimageThe combined image with the blended color-mapped heatmap.

Parameters

ParameterDefaultValid valuesUnitTunable
Heatmap gradient coloursTURBOTURBO, VIRIDIS, INFERNO, CIVIDIS-
Heatmap opacity500100%
Display zero valuesfalsetrue / false-

Heatmap gradient colours

The color palette used to map the heatmap intensity values to a specific color. Options like VIRIDIS and CIVIDIS are designed to be perceptually uniform and colorblind-friendly.

List of colormaps
Various colormaps can be used to visualize the heatmap.
Turbo heatmap
Turbo — vibrant, perceptually uniform. Ideal for real-time defect identification.
Viridis heatmap
Viridis — consistent, accessible. Ideal for general-purpose defect analysis.
Cividis heatmap
Cividis — colorblind-friendly, grayscale-compatible. Ideal for structural defect detection.
Inferno heatmap
Inferno — dark-to-light gradient. Ideal for thermal imaging and low-light inspection.

Heatmap opacity

Controls the transparency of the heatmap overlay. A value of 0 makes the heatmap invisible, while 100 makes it fully opaque, hiding the original image.

Display zero values

Controls whether regions with a heatmap value of 0 receive the color overlay.

  • false (default): Pixels where the heatmap value is 0 show the original image unchanged — the overlay is applied only where the heatmap has non-zero intensity.
  • true: The entire image is overlayed by the colormap, including areas with no heatmap signal.
Overlay with display zero values disabled — zero-intensity areas show the original image
Display zero values = false (default) — only non-zero heatmap regions are colored.
Overlay with display zero values enabled — the entire image is tinted by the colormap
Display zero values = true — the entire image receives the colormap tint, including zero-intensity areas.

Example

Visualize anomaly detection

An AI model generates an anomaly heatmap of potential foreign defects. This node applies the "TURBO" colormap at 50% opacity to highlight these defects in bright yellow/orange.

Configuration:

  • Heatmap gradient colours: TURBO
  • Heatmap opacity: 50

Result:

Example of output of the overlay heatmap node.
Example of an output from the overlay heatmap node.

Reference: