This figure illustrates the disjunctive and conjunctive reconstructive openning.
.
from morph import *
from Numeric import ones
f=mmreadgray('keyb.tif');
f=f[155:,:210];
Bh=mmimg2se(mmbinary(ones((16,2))));
Bd=mmserot(mmimg2se(ones((2,10))),-45);
Warning: Converting input image from int32 to binary uint8.
f1=mmopen(f,Bh)
f2=mmopen(f,Bd)
f1r=mmopenrec(f,Bh)
f2r=mmopenrec(f,Bd)
f3=mmunion(f1r,f2r)
f4=mmintersec(f1r,f2r)
mmshow(f)
mmshow(f1)
mmshow(f2)
mmshow(f3)
mmshow(f4)