0 ×

Image Difference Checker

Test-Node extension for KNIME Workbench version 4.3.0.v202011211923 by KNIME AG, Zurich, Switzerland

Used in regression tests to test the created image with a reference image. The node will compare (depending on the dialog settings) the incoming images during execute and fails with an exception if they are not equal (or do not meet the expectations). In that case the node stays not executed and the test will fail.

In the node's dialog, you can adjust how individual the images are compared. The default is to check for exact equality. For certain images you can relax the comparison by using special checkers, e.g. by specifying a certain allowed percentage of difference.

Currently there are four different image checker available:

  • pHash, which first downscales the image to the given size, converts it to grayscale, computes a discrete cosinus transformation (DCT) and finally takes only the given left upper part of the matrix (the low frequencies in the picture). Finally the two small matrices from both images are compared.
  • dHash, which works similar to the above, but skips the DCT step and compares difference between neighbouring pixels in the downscaled images.
  • A histogram-based comparison. It computes histograms for each of the three color channels with a configurable number of equal-sized bins. Then the difference between all pairs of bins between the two images are summed up and normalized for a percentage value.
  • Full difference compares the complete images. For each pixel and each color channel (excluding the alpha channel for now) the differences between reference and test image are summed up and then divided by the maximum possible differences.
In all cases a percentage between 0 and 100 is computed and compared to the given threshold.

Input Ports

Icon
Freshly created image that is tested.
Icon
The reference image.

Best Friends (Incoming)

Installation

To use this node in KNIME, install KNIME Testing Framework from the following update site:

KNIME 4.3

A zipped version of the software site can be downloaded here.

You don't know what to do with this link? Read our NodePit Product and Node Installation Guide that explains you in detail how to install nodes to your KNIME Analytics Platform.

Wait a sec! You want to explore and install nodes even faster? We highly recommend our NodePit for KNIME extension for your KNIME Analytics Platform. Browse NodePit from within KNIME, install nodes with just one click and share your workflows with NodePit Space.

Developers

You want to see the source code for this node? Click the following button and we’ll use our super-powers to find it for you.