This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

ImageDifference

ImageDifference
gives an image in which each pixel is the absolute difference of the corresponding pixels in and .
  • The images and must have the same dimensions.
  • ImageDifference works with arbitrary single-channel or multi-channel images.
  • If or is a single-channel image, the absolute difference is computed from each channel of the other image in ImageDifference.
  • If and are both multichannel images, the values in each channel are compared separately.
  • For binary images, ImageDifference effectively finds the logical XOR of pixel values.
Find differences between two versions of an image:
Logical XOR of two binary images:
Find differences between two versions of an image:
In[1]:=
Click for copyable input
Out[1]=
 
Logical XOR of two binary images:
In[1]:=
Click for copyable input
Out[1]=
Find the amount of variation in a fairly constant image:
Negate image pixels specified by a binary mask:
New in 8