This figure illustrates the regional maxima detection.
.
from morph import *
f=mmreadgray('pinha_n.tif');
B=mmsedisk(4);
B8=mmsebox();
f1=mmregmax(f,B8)
f2=mmregmax(mmopen(f,B),B8)
f3=mmregmax(mmopenrec(f,B),B8)
f4=mmregmax(mmareaopen(f,500),B8)
f5=mmregmax(mmhmax(f,80),B8)
mmshow(f)
mmshow(f1)
mmshow(f2)
mmshow(f3)
mmshow(f4)
mmshow(f5)