This figure illustrates the reconstructive opening top-hat.
.
from morph import *
A=mmareaopen(mmedgeoff(mmreadgray('cards.tif')),50)
B=mmsedisk(5)
C=mmopen(A,B)
D=mmopenrec(A,B,mmsebox())
E=mmopenrecth(A,B,mmsebox())
mmshow(A)
mmshow(C)
mmshow(D)
mmshow(E)