# mmcloserec
Closing by reconstruction.

## Synopsis

y = mmcloserec( f, bdil = None, bc = None )

Implemented in Python.

### Input

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

### Output

y | Image Same type of `f`.

## Description

mmcloserec creates the image `y` by a sup-reconstruction ( with the connectivity defined by the structuring element `bc`) of the image `f` from its dilation by `bdil`.

## Examples

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

    >>> mmshow(a)

    >>> b = mmcloserec(a,mmsebox(4))

    >>> mmshow(b)

a | b |

## Equation

## Source Code

    def mmcloserec(f, bdil=None, bc=None):
        if bdil is None: bdil = mmsecross()
        if bc is None: bc = mmsecross()
        y = mmsuprec(mmdil(f,bdil),f,bc)
        return y

## See also

mmfreedom | Control automatic data type conversion.
mmopenrec | Opening by reconstruction.
mmsuprec | Sup-reconstruction.
mmclose | Morphological closing.

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