Jump to content

Closing (morphology)

From Wikipedia, the free encyclopedia
The closing of the dark-blue shape (union of two squares) by a disk, resulting in the union of the dark-blue shape and the light-blue areas.

In mathematical morphology, the closing of a set (binary image) A by a structuring element B is the erosion of the dilation of that set,

where and denote the dilation and erosion, respectively.

In image processing, closing is, together with opening, the basic workhorse of morphological noise removal. Opening removes small objects, while closing removes small holes.

Example

[edit]

Perform Dilation ( ):

Suppose A is the following 11 x 11 matrix and B is the following 3 x 3 matrix:

    0 0 0 0 0 0 0 0 0 0 0
    0 1 1 1 1 0 0 1 1 1 0   
    0 1 1 1 1 0 0 1 1 1 0  
    0 1 1 1 1 1 1 1 1 1 0
    0 1 1 1 1 0 0 0 1 1 0              1 1 1
    0 1 1 1 1 0 0 0 1 1 0              1 1 1
    0 1 0 0 1 0 0 0 1 1 0              1 1 1
    0 1 0 0 1 1 1 1 1 1 0       
    0 1 1 1 1 1 1 1 0 0 0   
    0 1 1 1 1 1 1 1 0 0 0   
    0 0 0 0 0 0 0 0 0 0 0

For each pixel in A that has a value of 1, superimpose B, with the center of B aligned with the corresponding pixel in A.

Each pixel of every superimposed B is included in the dilation of A by B.

The dilation of A by B is given by this 11 x 11 matrix.

is given by :

    1 1 1 1 1 1 1 1 1 1 1
    1 1 1 1 1 1 1 1 1 1 1
    1 1 1 1 1 1 1 1 1 1 1   
    1 1 1 1 1 1 1 1 1 1 1  
    1 1 1 1 1 1 1 1 1 1 1
    1 1 1 1 1 1 0 1 1 1 1
    1 1 1 1 1 1 1 1 1 1 1
    1 1 1 1 1 1 1 1 1 1 1
    1 1 1 1 1 1 1 1 1 1 1       
    1 1 1 1 1 1 1 1 1 1 1   
    1 1 1 1 1 1 1 1 1 1 1   

Now, Perform Erosion on the result: ()

is the following 11 x 11 matrix and B is the following 3 x 3 matrix:

    1 1 1 1 1 1 1 1 1 1 1
    1 1 1 1 1 1 1 1 1 1 1   
    1 1 1 1 1 1 1 1 1 1 1  
    1 1 1 1 1 1 1 1 1 1 1
    1 1 1 1 1 1 1 1 1 1 1              1 1 1
    1 1 1 1 1 1 0 1 1 1 1              1 1 1
    1 1 1 1 1 1 1 1 1 1 1              1 1 1
    1 1 1 1 1 1 1 1 1 1 1       
    1 1 1 1 1 1 1 1 1 1 1   
    1 1 1 1 1 1 1 1 1 1 1   
    1 1 1 1 1 1 1 1 1 1 1

Assuming that the origin B is at its center, for each pixel in superimpose the origin of B, if B is completely contained by A the pixel is retained, else deleted.

Therefore the Erosion of by B is given by this 11 x 11 matrix.

() is given by:

    0 0 0 0 0 0 0 0 0 0 0
    0 1 1 1 1 1 1 1 1 1 0
    0 1 1 1 1 1 1 1 1 1 0
    0 1 1 1 1 1 1 1 1 1 0
    0 1 1 1 1 0 0 0 1 1 0
    0 1 1 1 1 0 0 0 1 1 0 
    0 1 1 1 1 0 0 0 1 1 0
    0 1 1 1 1 1 1 1 1 1 0 
    0 1 1 1 1 1 1 1 1 1 0 
    0 1 1 1 1 1 1 1 1 1 0
    0 0 0 0 0 0 0 0 0 0 0

Therefore Closing Operation fills small holes and smoothes the object by filling narrow gaps.

Properties

[edit]
  • It is idempotent, that is, .
  • It is increasing, that is, if , then .
  • It is extensive, i.e., .
  • It is translation invariant.

See also

[edit]

Bibliography

[edit]
  • Image Analysis and Mathematical Morphology by Jean Serra, ISBN 0-12-637240-3 (1982)
  • Image Analysis and Mathematical Morphology, Volume 2: Theoretical Advances by Jean Serra, ISBN 0-12-637241-1 (1988)
  • An Introduction to Morphological Image Processing by Edward R. Dougherty, ISBN 0-8194-0845-X (1992)
[edit]