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

Erosion

Erosion
gives the morphological erosion of image with respect to the structuring element ker.
Erosion
gives the erosion with respect to a range-r square.
  • Erosion works with binary, grayscale, and other images.
  • The structuring element ker is a matrix containing s and s.
  • Erosion automatically adds zeros to structuring elements so that they have odd dimensions.
  • If multiple image channels are present, Erosion operates on each of them separately.
  • Erosion takes a Padding option that specifies the values to assume for pixels outside the image.
  • The default setting is Padding, corresponding to pixel value for all channels.
  • Erosion interprets the structuring element so that Erosion translates the image to the left.
Erosion reduces smaller light features:
Erosion of a grayscale image, using a disk-shaped structuring element:
Erosion of a grayscale photo:
Erosion operates on each color channel independently:
Erosion reduces smaller light features:
In[1]:=
Click for copyable input
Out[1]=
 
Erosion of a grayscale image, using a disk-shaped structuring element:
In[1]:=
Click for copyable input
Out[1]=
 
Erosion of a grayscale photo:
In[1]:=
Click for copyable input
Out[1]=
 
Erosion operates on each color channel independently:
In[1]:=
Click for copyable input
Out[1]=
Structuring elements are padded to odd dimensions, which can create artifacts at the right and bottom boundaries:
New in 7