ImageAdd

ImageAdd[image,x]
adds an amount x to each channel value in image.

ImageAdd[image1,image2]
gives an image in which each pixel is the sum of the corresponding pixels in and .

ImageAdd[image,expr1,expr2,]
adds all to image, where each can be either an image, a number, or a color value.

DetailsDetails

  • The image returned by ImageAdd[image,] has the same dimensions as image.
  • In ImageAdd[image,x], x can be a number normally in the range 0 to 1, a color, or a list of color channel values.
  • ImageAdd[image,x] typically gives an image with the same underlying data type as image, clipping or truncating values if necessary.
  • If the image dimensions are different, ImageAdd[image1,image2] adds at the center of .
  • If or is a single-channel image, its values are added to the values in each channel of the other image in ImageAdd[image1,image2].
  • If and are both multichannel images, the values in each channel are added separately.
  • ImageAdd[image1,image2] gives an image with the largest type of either or , clipping or truncating values if necessary.
  • For binary images, ImageAdd effectively finds the logical OR of pixel values.
  • ImageAdd[image,expr1,expr2,] folds ImageAdd on the list of arguments.
  • ImageAdd[{image,expr1,expr2,}] is equivalent to ImageAdd[image,expr1,expr2,].
  • ImageAdd works with Image3D objects.

ExamplesExamplesopen allclose all

Basic Examples  (3)Basic Examples  (3)

Brighten a color image by adding a constant amount to all channels:

In[6]:=
Click for copyable input
Out[6]=

Add two color images:

In[1]:=
Click for copyable input
Out[1]=

Logical OR of two binary images:

In[1]:=
Click for copyable input
Out[1]=
Introduced in 2008
(7.0)
| Updated in 2014
(10.0)