Wolfram Language & System 10.0 (2014)|Legacy Documentation

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


returns a list of pixel positions in image that match the value val.

returns all pixel positions that have values within a distance d from val.


  • PixelValuePositions returns a list of integer positions where , with assumed to be in the standard image coordinate system where the values of x range from to width, and the values of y range from to height. Pixel position represents the center of the pixel at the bottom-left corner.
  • In 3D, PixelValuePositions[image,val] returns the positions , such that pixel position corresponds to the center of the bottom-left front pixel.
  • The pixel value val can be a scalar, a list of channel values, or a color.
  • PixelValuePositions[image,val] is equivalent to PixelValuePositions[image,val,0].
  • PixelValuePositions[image,"Min"] and PixelValuePositions[image,"Max"] can be used to return pixel positions with minimum and maximum intensity values, respectively.
  • ImageValuePositions[image,val] is equivalent to PixelValuePositions[image,val]-0.5.

ExamplesExamplesopen allclose all

Basic Examples  (3)Basic Examples  (3)

Extract positions of the white pixels:

Click for copyable input

Positions of the pixels with values within the specified distance from white:

Click for copyable input

Positions of white pixels in a 3D image:

Click for copyable input
Introduced in 2012