This is documentation for Mathematica 7, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

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.
  • MaxFilter[image, r] finds the maximum in (2r+1)×(2r+1) blocks centered on each pixel.
  • At the edges of an image, MaxFilter uses smaller neighborhoods.
  • 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.
  • In MaxFilter[data, ...], data can be an array of any rank.
Use a maximum filter to dilate the brighter parts of a color image:
Dilate the brighter parts of an image to remove thin dark features:
Maximum filter of a vector:
Use a maximum filter to dilate the brighter parts of a color image:
In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
 
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]=
Remove pepper noise from an astronomical image:
New in 7