DifferencePercent: output parameter. It is a double data type and gives information about the percentage difference.
Let´s look at some examples:
First example: comparing identical images.
The image adapter Will have as its only parameter the path to the image you want to work with:
If we want to compare this image with another one, we have to use this function and put inside in the path of the other image we want to compare:
Note: where to sabe the resulting image is optional. If we put a path, it will be saved in that path. If nothing is specified, it will be saved in the TCD directory.
As they are exactly the same image:
When running the test case:
The result will say that there is zero difference:
The output variable Will be a double, so that it has decimals.
Second example: compare equal images of different sizes.
It is still the image of the tree we used in the previous example.
The size of this photo has the following dimensions:
Now we will compare it against:
There are exactly the same image, but this second one, if we open the details tab, has the following size:
Run the case:
And then it tells us the percentage of the difference is:
In this example, it does find differences.
As the images are different, it will mark the differences it finds by framing them in a red box.
Note: up to 10, can be the same image that has been resized and placed in black and white.
Third example: changes in the image.
In this example, yellow balls have been added. It is the same image and the same size.
When run the case:
It is marking the differences he finds, which are precisely the yellow balls, added with a red box.
Fourth example: same image in shadow.
In this example, it will be compared with same image, but more shaded.
It tells us that the image is different in its entirety, as it frames it all in red:
But as it is the same image the difference it finds in not vert high. As can be seen in the image below.
Fifth example: two different images.
If we compare two completely different images, the difference starts at 20%.
In this example, we choose to compare the image of the plane.
In the TCD folder, it returns the second image, the image of the plane.

The difference approaches 20. When it approaches 20, the image has nothing to do with each other.