# mminfrec
Inf-reconstruction.

## Synopsis

y = mminfrec( f, g, bc = None )

Implemented in Python.

### Input

f | Image Gray-scale (uint8 or uint16) or binary image. Marker image.
g | Image Gray-scale (uint8 or uint16) or binary image. Conditioning image.
bc | Structuring Element Structuring element ( connectivity). Default: `None` (3x3 elementary cross)

### Output

y | Image

## Description

mminfrec creates the image `y` by an infinite number of recursive iterations (iterations until stability) of the dilation of `f` by `bc` conditioned to `g`. We say the `y` is the inf-reconstruction of `g` from the marker `f`. For algorithms and applications, see Vinc:93b.

## Examples

Binary image:

    >>> g=mmreadgray('text_128.tif')

    >>> f=mmero(g,mmseline(9,90))

    >>> y=mminfrec(f,g,mmsebox())

    >>> mmshow(g)

    >>> mmshow(f)

    >>> mmshow(y)

g | f | y |

Gray-scale image:

    >>> g=mmneg(mmreadgray('n2538.tif'))

    >>> f=mmintersec(g,0)

    Warning: Converting input image from int32 to uint8.

    >>> f=mmdraw(f,'LINE:40,30,60,30:END')

    >>> y30=mmcdil(f,g,mmsebox(),30)

    >>> y=mminfrec(f,g,mmsebox())

    >>> mmshow(g)

    >>> mmshow(f)

    >>> mmshow(y30)

    >>> mmshow(y)

g | f | y30 | y |

## Equation

## Source Code

    def mminfrec(f, g, bc=None):
        from Numeric import product
        if bc is None: bc = mmsecross()
        n = product(f.shape)
        y = mmcdil(f,g,bc,n);
        return y

## See also

mmfreedom | Control automatic data type conversion.
mmsuprec | Sup-reconstruction.
mmsebox | Create a box structuring element.
mmsecross | Diamond structuring element and elementary 3x3 cross.
mmcdil | Dilate an image conditionally.

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