Closing

Closing[image,ker]

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

Closing[image,r]

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

Closing[data,]

applies closing to an array of data.

Details

  • Closing 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 0s and 1s.
  • Closing automatically pads structuring elements to have odd dimensions.
  • Closing[image,r] is equivalent to Closing[image,BoxMatrix[r]].

Examples

open allclose all

Basic Examples  (3)

Closing of a binary image using a disk-shaped structuring element:

Closing of a grayscale image using a disk-shaped structuring element:

Closing of a hole in a 3D image:

Scope  (10)

Data  (7)

Close small gaps in a numeric vector:

Closing of a numeric vector:

Closing of a 2D binary array:

Closing of a binary image with a diamond-shaped structuring element:

Closing of a grayscale image:

Closing of a color texture pattern with a square-shaped structuring element:

Closing of a symbolic array of data:

Parameters  (3)

Close horizontally:

Close vertically:

Close with radius , equivalent to BoxMatrix[r]:

Applications  (4)

Closing removes holes that are smaller than the structuring elements:

Remove holes from a color image:

Remove thin, dark features by morphological closing:

Use morphological closing to remove pepper noise from a color photo:

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

Text

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

CMS

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

APA

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

BibTeX

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

BibLaTeX

@online{reference.wolfram_2024_closing, organization={Wolfram Research}, title={Closing}, year={2012}, url={https://reference.wolfram.com/language/ref/Closing.html}, note=[Accessed: 22-November-2024 ]}