# mmclose
Morphological closing.

## Synopsis

y = mmclose( f, b = None )

Implemented in Python.

### Input

f | Image Gray-scale (uint8 or uint16) or binary image.
b | Structuring Element Default: `None` (3x3 elementary cross)

### Output

y | Image

## Description

mmclose creates the image `y` by the morphological closing of the image `f` by the structuring element `b`. In the binary case, the closing by a structuring element `B` may be interpreted as the intersection of all the binary images that contain the image `f` and have a hole equal to a translation of `B`. In the gray-scale case, there is a similar interpretation taking the functions umbra.

## Examples

    >>> f=mmreadgray('blob.tif')

    >>> bimg=mmreadgray('blob1.tif')

    >>> b=mmimg2se(bimg)

    >>> mmshow(f)

    >>> mmshow(mmclose(f,b))

    >>> mmshow(mmclose(f,b),mmgradm(f))

f | mmclose(f,b) |

mmclose(f,b),mmgradm(f) |

    >>> f = mmreadgray('form-1.tif')

    >>> mmshow(f)

    >>> y = mmclose(f,mmsedisk(4))

    >>> mmshow(y)

f | y |

    >>> f = mmreadgray('n2538.tif')

    >>> mmshow(f)

    >>> y = mmclose(f,mmsedisk(3))

    >>> mmshow(y)

f | y |

## Equation

## Source Code

    def mmclose(f, b=None):
        if b is None: b = mmsecross()
        y = mmero(mmdil(f,b),b)
        return y

## See also

mmopen | Morphological opening.
mmfreedom | Control automatic data type conversion.
mmsebox | Create a box structuring element.
mmsecross | Diamond structuring element and elementary 3x3 cross.
mmimg2se | Create a structuring element from a pair of images.
mmsesum | N-1 iterative Minkowski additions

[`mmasf`] [Up] [`mmopen`] |
Copyright (c) 2003, Roberto A. Lotufo, UNICAMP-University of Campinas; Rubens C. Machado, CenPRA-Renato Archer Research Center.