Dilation

Dilation[image,ker]

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

Dilation[image,r]

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

Dilation[data,]

applies dilation to an array of data.

Details and Options

  • Dilation is also known as Minkowski addition.
  • Dilation 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.
  • Dilation[image,r] is equivalent to Dilation[image,BoxMatrix[r]].
  • The structuring element is automatically padded with zeros to have odd dimensions. »
  • Dilation takes a Padding option that specifies the values to assume for pixels outside the image.
  • By default, Padding0 is used for images, corresponding to pixel value 0 for all channels.

Examples

open allclose all

Basic Examples  (3)

Dilation of a binary image:

Dilation of a grayscale image:

Dilation of a 3D shape:

Scope  (13)

Data  (7)

Dilation of a 2D binary array:

Dilation of a binary image:

Dilation of a numeric array:

Dilation of a numeric vector:

Dilation of a grayscale image:

Dilation of a color image:

Dilation on a symbolic array of data:

Parameters  (6)

Dilate horizontally:

Dilate vertically:

Dilate with radius , equivalent to BoxMatrix[r]:

Dilate with a diagonal structuring element:

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

Dilate a 3D volume using a 3D kernel:

Options  (2)

Padding  (2)

By default, the smallest possible number is used for padding when applying dilation to arrays:

Specify a custom padding:

By default, Padding->0 is used for images:

Specify a custom padding:

Applications  (2)

Dilation increases the amount of white space in the image, therefore removing smaller, dark features:

Compute external morphological gradient as a difference between dilated and original image:

Properties & Relations  (2)

Binary dilation is extensive if the center of the structuring element is 1:

Extensivity means that all elements of f are included in the Dilation[f,ker]:

Dilation with a box structuring element is the same as MaxFilter:

Possible Issues  (1)

Image dilation with a kernel of all zeros will result in a zero image:

Array dilation with an all-zero kernel will result in an array of :

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

Text

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

CMS

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

APA

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

BibTeX

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

BibLaTeX

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