# mmcero
Erode an image conditionally.

## Synopsis

y = mmcero( f, g, b = None, n = 1 )

Implemented in Python.

### Input

f | Image Gray-scale (uint8 or uint16) or binary image.
g | Image Gray-scale (uint8 or uint16) or binary image. Conditioning image.
b | Structuring Element Default: `None` (3x3 elementary cross)
n | Double Non-negative integer. (number of iterations). Default: `1`

### Output

y | Image

## Description

mmcero creates the image `y` by eroding the image `f` by the structuring element `b` conditionally to `g`. This operator may be applied recursively `n` times.

## Examples

    >>> f = mmneg(mmtext('hello'))

    >>> mmshow(f)

    >>> g = mmdil(f,mmseline(7,90))

    >>> mmshow(g)

    >>> a1=mmcero(g,f,mmsebox())

    >>> mmshow(a1)

    >>> a13=mmcero(a1,f,mmsebox(),13)

    >>> mmshow(a13)

f | g | a1 | a13 |

## Equation

## Source Code

    def mmcero(f, g, b=None, n=1):
        if b is None: b = mmsecross()
        y = mmunion(f,g)
        for i in range(n):
            aux = y
            y = mmunion(mmero(y,b),g)
            if mmisequal(y,aux): break
        return y

## See also

mmero | Erode an image by a structuring element.
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.
mmsuprec | Sup-reconstruction.

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