[mmskelm] [Up] [mmendpoints] Residues

mmskelmrec
Morphological skeleton reconstruction (Inverse Medial Axis Transform).

Synopsis

y = mmskelmrec( f, B = None )

Implemented in Python.

Input

f Image Gray-scale (uint8 or uint16) or binary image.
B Structuring Element

Default: None (Diamond structuring element with radius 1)

Output

y Image Binary image.

Description

mmskelmrec reconstructs the valued morphological skeleton to recover the original image.

Source Code

def mmskelmrec(f, B=None):
    from Numeric import ravel
    if B is None: B = mmsecross()
    y = mmbinary(mmintersec(f, 0))
    for r in range(max(ravel(f)),1,-1):
        y = mmdil(mmunion(y,mmbinary(f,r)), B)
    y = mmunion(y, mmbinary(f,1))
    return y
    

See also

mmfreedom Control automatic data type conversion.
mmskelm Morphological skeleton (Medial Axis Transform).
[mmskelm] [Up] [mmendpoints] Python