from morph import *
from MLab import transpose
a = transpose(mmreadgray('beef.tif'));
c = mmthreshad(a,uint8(10));
d = mmareaclose(c,200);
e = mmgradm(d,mmsecross(1),mmsebox(9));
f = mmero(d,mmsecross(95));
g = mmunion(e,f);
h = mmgradm(mmclose(a));
ws= mmcwatershed(h,g);
fig_a=mmunion(mmgray(g),h);
fig_b=ws;
fig_c=mmintersec(mmgray(mmneg(mmdil(ws))),a);
mmshow(fig_a)
mmshow(fig_b)
mmshow(fig_c)