Wolfram Language & System 11.0 (2016)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.View current documentation (Version 11.2)


applies the function f to the list of channel values for each pixel in image, giving the row and column index of each pixel as a second argument to f.

applies f to the sequence of corresponding pixel values taken from each imagei, giving the corresponding row and column index of pixels as the last argument to f.

Details and OptionsDetails and Options

  • ImageApplyIndexed[f,image] replaces the list of channel values for each pixel by the result of applying the function f to the list.
  • In 2D, the part specification of each pixel is passed to f as {row,column}.
  • In 3D, the part specifications are specified with {slice,row,column}.
  • ImageApplyIndexed works on images with any number of channels.
  • ImageApplyIndexed[f,image] returns an image of the same type as image.
  • In ImageApplyIndexed[f,image], the function f can return a number or a list of any length.
  • The channel values supplied to f are normally in the range 0 to 1, regardless of the underlying type used in the Image object. The function f is assumed to return channel values that are normally in the range 0 to 1.
  • In ImageApplyIndexed[f,{image1,image2,,imagen}], f is supplied with n+1 arguments.
  • ImageApplyIndexed[f,{image1,image2,}] works with any number of commensurate images.
  • ImageApplyIndexed[f,{image1,image2,}] gives an image with the largest type of imagei, clipping or truncating values if necessary.
  • ImageApplyIndexed has the option Interleaving, which specifies whether f should be applied to individual channel values or to the complete list of channel values for a given pixel. The default setting is Interleaving->True.
  • ImageApplyIndexed works with Image3D objects.

ExamplesExamplesopen allclose all

Basic Examples  (2)Basic Examples  (2)

Apply a pure function defined on the pixel's value and position:

Click for copyable input

Apply a function depending on the pixel's values and position to a list of images:

Click for copyable input
Introduced in 2014