Opening

Opening[image,ker]

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

Opening[image,r]

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

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)

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

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

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

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

Scope  (9)

Data  (6)

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

Opening of a numeric vector:

Opening of a 2D binary array:

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

Opening of a grayscale image:

Opening of a symbolic array of data:

Kernel  (3)

Open horizontally:

Open vertically:

Open using a uniform, square structuring element:

Applications  (2)

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

Extract 3D objects larger than the structuring element:

Properties & Relations  (3)

Even-length kernels get right-padded with zeros:

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

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

Introduced in 2008
 (7.0)
 |
Updated in 2012
 (9.0)