ImageDifference

ImageDifference[image1,image2]
gives an image in which each pixel is the absolute difference of the corresponding pixels in image1 and image2.

DetailsDetails

  • The images image1 and image2 must have the same dimensions.
  • ImageDifference works with arbitrary single-channel or multi-channel images.
  • If image1 or image2 is a single-channel image, the absolute difference is computed from each channel of the other image in ImageDifference[image1,image2].
  • If image1 and image2 are both multichannel images, the values in each channel are compared separately.
  • ImageDifference[image1,image2] gives an image with the largest type of either image1 or image2.
  • For binary images, ImageDifference effectively finds the logical XOR of pixel values.
  • ImageDifference works with Image3D objects.

ExamplesExamplesopen allclose all

Basic Examples  (2)Basic Examples  (2)

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]=
Introduced in 2010
(8.0)
| Updated in 2012
(9.0)
Translate this page: