from morph import *
aux=mmreadgray('pinha.tif');
f=mmareaclose(mmareaopen(mmthreshad(mmasf(aux),61),30),100);
Warning: Converting input image from int32 to uint8.
center=mmareaopen(mmsubm(mmclohole(f),f),1000);
aux_seeds=mmunion(f,center);
seeds=mmsubm(mmclohole(aux_seeds),aux_seeds);
g=mmunion(f,seeds);
d=mmgdist(g,seeds,mmsebox(),'EUCLIDEAN');
ws=mmcwatershed(d,mmregmin(d));
fig_a = mmunion(mmgray(f),mmgray(seeds,'uint8',200));
fig_b = d % 6;
fig_c = mmintersec(mmneg(ws),f);
mmshow(fig_a)
mmshow(fig_b)
Warning: Converting input image from int32 to uint16.
mmshow(fig_c)