filters image by replacing every pixel by the difference of the maximum and minimum in its range-r neighborhood.


applies a range filter to an array of data.


  • RangeFilter works with arbitrary-rank numerical arrays, regular and irregular time series, 2D and 3D images, and sampled sound objects, operating separately on each channel.
  • RangeFilter[image,r] finds the range in blocks centered on each pixel.
  • At the edges of an image, RangeFilter uses smaller neighborhoods.
  • RangeFilter[image,{rrow,rcol}] uses range rrow in height, and rcol in width.
  • RangeFilter[image,{rslice,rrow,rcol}] uses range rslice in height, rrow in depth, and rcol in width.
  • For multichannel images, RangeFilter[image,] replaces each pixel by the difference of the pixels in its neighborhood that have maximum and minimum total intensity, averaged over all channels.
  • RangeFilter returns an image of the same type and the same dimensions as the original image.


open allclose all

Basic Examples  (2)

Range filtering used for edge detection:

Click for copyable input

Range filtering of a 3D image:

Click for copyable input

Scope  (2)

See Also

MinMax  EdgeDetect  MinFilter  MaxFilter  GradientFilter

Introduced in 2010
| Updated in 2015