Image Similarity
Overview
Image Similarity node compares the current input frame against a reference image and reports a similarity score along with contours marking the regions that differ between the two.
Use this node to detect changes between frames, identify surface defects or contamination against a known-good reference, or monitor for unexpected scene alterations.
Input
Input Image
image requiredThe live frame to compare. Connect this to a camera or upstream image output.
Reference Frame
imageThe reference image to compare against. When not connected, the node uses the first received frame as the reference.
Mode
stringMethod used to compute the similarity score and difference map.
Values:
ABS(default) — absolute pixel-level difference. Simple and fast; sensitive to brightness shifts.SSIM— Structural Similarity Index. Accounts for luminance, contrast, and structure; more perceptually meaningful thanABS.PSNR— Peak Signal-to-Noise Ratio. A logarithmic score where higher values indicate more similarity.
Threshold
integer requiredBinary threshold applied to the difference map before contour extraction. Pixels with a difference value above this threshold are treated as changed regions.
Range: 0 to 255
Default: 128
Lower values make the node more sensitive to small differences; higher values suppress minor variations such as sensor noise.
Overlay Results
boolean requiredWhen enabled, highlights the detected difference contours on the output frame. See Overlay Results.
Output
Overlay Image
imageOutput frame from the node. If overlays are enabled, difference regions are highlighted on this frame.
Score
numberSimilarity score based on the selected Mode. Higher scores indicate greater similarity for SSIM and PSNR; lower scores indicate greater similarity for ABS.
Difference Contours
arrayArray of contour objects describing the pixel regions that differ between the input and reference frame. Each contour is a list of [x, y] points.