MaxFilter

MaxFilter[image,r]

filters image by replacing every value by the maximum in its range-r neighborhood.

MaxFilter[data,r]

applies max filtering to an array of data.

Details

  • MaxFilter works with arbitrary-rank numerical arrays, regular and irregular time series, 2D and 3D images, and sampled sound objects, operating separately on each channel.
  • MaxFilter[image,r] finds the maximum in blocks centered on each pixel.
  • At the edges of an image, MaxFilter uses smaller neighborhoods.
  • MaxFilter[image,{rrow,rcol}] uses range rrow in height, and rcol in width.
  • MaxFilter[image,{rslice,rrow,rcol}] uses range rslice in height, rrow in depth, and rcol in width.
  • MaxFilter[image,{r1,r2}] uses neighborhoods with vertical range r1 and horizontal range r2.
  • For multichannel images, MaxFilter[image,] replaces each pixel by a pixel in its neighborhood that has the maximum total intensity, averaged over all channels.

Examples

open allclose all

Basic Examples  (4)

Use a maximum filter to dilate the brighter parts of a color image:

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

Dilate the brighter parts of an image to remove thin, dark features:

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

Maximum filter of a vector:

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

Maximum filter of a 3D image:

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

Scope  (1)

Applications  (1)

Properties & Relations  (1)

See Also

Min  MinFilter  MeanFilter  RangeFilter  MedianFilter  CommonestFilter  ImageFilter

Introduced in 2008
(7.0)
| Updated in 2015
(10.2)