# mmopen
Morphological opening.

## Synopsis

y = mmopen( 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

mmopen creates the image `y` by the morphological opening of the image `f` by the structuring element `b`. In the binary case, the opening by the structuring element `B` may be interpreted as the union of translations of `B` included in `f`. In the gray-scale case, there is a similar interpretation taking the functions umbra.

## Examples

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

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

    >>> b=mmimg2se(bimg)

    >>> mmshow(f)

    >>> mmshow(mmopen(f,b))

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

f | mmopen(f,b) |

mmopen(f,b),mmgradm(f) |

    >>> a=mmbinary(mmreadgray('pcb1bin.tif'))

    >>> b=mmopen(a,mmsebox(2))

    >>> c=mmopen(a,mmsebox(4))

    >>> mmshow(a)

    >>> mmshow(b)

    >>> mmshow(c)

a | b |

c |

    >>> a=mmreadgray('astablet.tif')

    >>> b=mmopen(a,mmsedisk(18))

    >>> mmshow(a)

    >>> mmshow(b)

a | b |

## Equation

## Source Code

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

## See also

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

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