Erosion

Erosion[image,ker]

gives the morphological erosion of image with respect to the structuring element ker.

Erosion[image,r]

gives the erosion with respect to a range-r square.

Erosion[data,]

applies erosion to an array of data.

Details and Options

  • Erosion is also known as Minkowski subtraction.
  • Erosion works with arbitrary 2D and 3D images, operating separately on each channel, as well as data arrays of any rank.
  • The structuring element ker is a matrix containing s and s.
  • Erosion[image,r] is equivalent to Erosion[image,BoxMatrix[r]].
  • The structuring element is automatically padded with zeros to have odd dimensions. »
  • Erosion takes a Padding option that specifies the values to assume for pixels outside the image.
  • By default, Padding->1 is used for images, corresponding to pixel value for all channels.

Examples

open allclose all

Basic Examples  (3)

Erosion of a binary image with a disk-shaped structuring element:

Erosion of a grayscale image:

Erosion of a 3D shape:

Scope  (13)

Data  (7)

Erosion of a 2D binary array:

Erosion of a binary image:

Erosion of a numeric array:

Erosion of a numeric vector:

Erosion of a grayscale image:

Erosion of a color image:

Erosion on a symbolic array of data:

Parameters  (6)

Erode horizontally:

Erode vertically:

Erode with radius , equivalent to a BoxMatrix[r]:

Erode using different radii:

Erode with a diagonal structuring element:

Structuring elements with even dimensions are right-padded with zeros:

Erode a 3D volume using a 3D kernel:

Options  (2)

Padding  (2)

By default, the largest possible number is used for padding when applying erosion to arrays:

Specify a custom padding:

By default, Padding1 is used for images:

Specify a custom padding:

Applications  (2)

Erosion reduces smaller, light features:

Internal morphological gradient computed by subtracting the eroded image from the original image:

Properties & Relations  (2)

Erosion with a {0,0,1} kernel is effectively a translation to the left:

Application of Erosion followed by Dilation is the same as Opening:

Wolfram Research (2008), Erosion, Wolfram Language function, https://reference.wolfram.com/language/ref/Erosion.html (updated 2012).

Text

Wolfram Research (2008), Erosion, Wolfram Language function, https://reference.wolfram.com/language/ref/Erosion.html (updated 2012).

CMS

Wolfram Language. 2008. "Erosion." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2012. https://reference.wolfram.com/language/ref/Erosion.html.

APA

Wolfram Language. (2008). Erosion. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Erosion.html

BibTeX

@misc{reference.wolfram_2024_erosion, author="Wolfram Research", title="{Erosion}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/Erosion.html}", note=[Accessed: 21-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_erosion, organization={Wolfram Research}, title={Erosion}, year={2012}, url={https://reference.wolfram.com/language/ref/Erosion.html}, note=[Accessed: 21-December-2024 ]}