This figure illustrates image simplification using the watershed transform.
.
from morph import *
from Numeric import shape
f=mmreadgray('jangada.tif');
f=f[99:-50,:];
g = mmareaclose(mmgradm(f),10);
cb=mmwatershed(mmhmin(g,8),mmsecross(),'regions');
g=mmgrain(cb,f,'mean');
mmshow(f);
mmshow(g);