WOLFRAM

Copy to clipboard.
Opening[image,ker]

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

Copy to clipboard.
Opening[image,r]

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

Copy to clipboard.
Opening[data,]

applies opening to an array of data.

Details

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

Examples

open allclose all

Basic Examples  (4)Summary of the most common use cases

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

Out[1]=1

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

Out[1]=1

Opening of a color photo with a diamond-shaped structuring element:

Out[1]=1

Opening of a 3D image using a cubic structuring element:

Out[1]=1

Scope  (9)Survey of the scope of standard use cases

Data  (6)

Use Opening to remove short sequences of 1s from a numeric vector:

Out[1]=1

Opening of a numeric vector:

Out[2]=2

Opening of a 2D binary array:

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

Out[1]=1

Opening of a grayscale image:

Out[1]=1

Opening of a symbolic array of data:

Out[1]=1

Kernel  (3)

Open horizontally:

Out[1]=1

Open vertically:

Out[1]=1

Open using a uniform, square structuring element:

Out[1]=1

Applications  (2)Sample problems that can be solved with this function

Use morphological opening to extract objects larger than the structuring element:

Out[1]=1

Extract 3D objects larger than the structuring element:

Out[1]=1

Properties & Relations  (3)Properties of the function, and connections to other functions

Even-length kernels get right-padded with zeros:

Out[2]=2

For symmetric kernels, Opening corresponds to an Erosion followed by a Dilation:

Out[1]=1

For non-symmetric kernels, Opening corresponds to Erosion followed by a Dilation with a reflected structuring element:

Out[2]=2
Wolfram Research (2008), Opening, Wolfram Language function, https://reference.wolfram.com/language/ref/Opening.html (updated 2012).
Copy to clipboard.
Wolfram Research (2008), Opening, Wolfram Language function, https://reference.wolfram.com/language/ref/Opening.html (updated 2012).

Text

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

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

CMS

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

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

APA

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

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

BibTeX

@misc{reference.wolfram_2024_opening, author="Wolfram Research", title="{Opening}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/Opening.html}", note=[Accessed: 07-January-2025 ]}

Copy to clipboard.
@misc{reference.wolfram_2024_opening, author="Wolfram Research", title="{Opening}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/Opening.html}", note=[Accessed: 07-January-2025 ]}

BibLaTeX

@online{reference.wolfram_2024_opening, organization={Wolfram Research}, title={Opening}, year={2012}, url={https://reference.wolfram.com/language/ref/Opening.html}, note=[Accessed: 07-January-2025 ]}

Copy to clipboard.
@online{reference.wolfram_2024_opening, organization={Wolfram Research}, title={Opening}, year={2012}, url={https://reference.wolfram.com/language/ref/Opening.html}, note=[Accessed: 07-January-2025 ]}