This figure illustrates the opening top-hat.
.
from morph import *
F=mmreadgray('gear.tif')
mmshow(F)
B=mmsedisk(10)
mmshow(mmseshow(B))
E=mmopen(F,B)
mmshow(E)
O=mmopenth(F,B)
mmshow(O)