This figure illustrates the use of connected flat alternating sequential filter.
.
from morph import *
f=mmreadgray('csample.jpg')
a=f[:128,:128]
b=mmasf(a,'oc',mmsecross(),2)
c=mmasfrec(a,'oc',mmsecross(),mmsecross(),2)
d=mmareaclose(mmareaopen(a,30),30)
mmshow(a)
mmshow(b)
mmshow(c)
mmshow(d)