This figure illustrates the gray-scale morphological gradients.
.
from morph import *
from MLab import rot90
from Numeric import shape
f=mmreadgray('astablet.tif')
f=rot90(f[:,:shape(f)[1]/2+10])
B1=mmsedisk(1)
B0=mmsebox(0)
ge=mmgradm(f,B1,B0)
gi=mmgradm(f,B0,B1)
g=mmgradm(f,B1,B1)
mmshow(f)
mmshow(ge)
mmshow(gi)
mmshow(g)