Back to Node List

Image Difference

image_difference

Visualizes pixel differences between two images and reports QA metrics.

Reviewed
Guide available
The node name and summary are available in English. Port, parameter, and article details are currently shown in Japanese.

Input Ports

NameTypeDescription
画像A
a
Image
Required
基準または変更前の画像です。
画像B
b
Image
Required
比較対象または変更後の画像です。

Output Ports

NameTypeDescription
差分画像
difference
Image
チャンネルごとの差を絶対値で示す画像です。
変更ピクセル数
changed_pixels
Int
誤差がしきい値を超えたピクセル数です。
変更率
changed_ratio
Float
比較対象ピクセルに占める変更ピクセルの割合です。
平均誤差
mean_error
Float
最大チャンネル差を基準にした平均誤差です。
最大誤差
max_error
Float
最大のチャンネル誤差です。
変更範囲
bounds
Map
変更ピクセルを囲む矩形です。変更なしの場合は幅と高さが0です。

Parameters

NameTypeDefaultRangeDescription / Options
変更しきい値
threshold
Float
00–1 / step 0.001

この値より大きい誤差を変更として数えます。

アルファを比較
compare_alpha
Bool
true

誤差と差分画像にアルファ差も含めます。オフでは、両方が完全透明のピクセルに保存されたRGB差を無視します。

Overview

Compares two images pixel by pixel, such as before/after or standard/variant versions. In addition to a difference image, it outputs the number and percentage of changed pixels, error, and change bounds, supporting both visual inspection and automated QA.

Usage tips

  • Connect the reference image to a and the comparison target to b. Areas where the image dimensions differ are compared against transparent pixels.
  • Use threshold = 0 for exact equality, or a small positive value to ignore compression artifacts and tiny rounding errors.
  • bounds is a Map with x, y, width, and height. Width and height are 0 when there are no changes.

Common pitfalls

Turn compare_alpha OFF when only transparency differs and you want to compare RGB alone. With it OFF, stored RGB differences are ignored when both pixels are fully transparent because they cannot affect the visible result. The difference image is not automatically amplified for visibility, so use the numeric outputs as well for very small differences.

Related nodes

  • tile_preview: visually inspect tile seams
  • batch_render: create an image list for multiple variants
Back to Node List
Image Difference — PixPipeline Node Reference