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

ImageSubtract

ImageSubtract
subtracts a constant amount x from each channel value in image.
ImageSubtract
gives an image in which each pixel is obtained by subtracting the values of the corresponding pixels in and .
  • The image returned by ImageSubtract has the same dimensions as image.
  • If the image dimensions are different, ImageSubtract subtracts from the center of .
  • If or is a single-channel image, its values are subtracted from the values in each channel of the other image in ImageAdd.
  • If and are both multichannel images, the values in each channel are subtracted separately.
  • ImageSubtract gives an image with the same underlying data type as image, clipping or truncating values if necessary.
  • ImageSubtract gives an image with the largest type of either or , clipping or truncating values if necessary.
Subtract a binary mask from a color photo:
Subtracting a constant amount from each color channel darkens an image:
Subtract a binary mask from a color photo:
In[1]:=
Click for copyable input
Out[1]=
 
Subtracting a constant amount from each color channel darkens an image:
In[1]:=
Click for copyable input
Out[1]=
Create an unsharp mask by subtracting a blurred version:
Add the unsharp mask to the original image:
New in 7