[hofig7s13] [Up] [hofig7s17] Chapter 7 - Morphological Segmentation - Watershed

hofig7s14
Segmentation of cornea cells from a noise image

Description

This figure illustrates the segmentation of cornea cells from a noise image.

Demo Script

.

from morph import *
from Numeric import shape
aux = mmreadgray('corneacells.tif');
a=aux[:shape(aux)[0]/2,:shape(aux)[1]/2];
c = mmopen(a,mmsedisk(2));
d = mmregmax( c);
e = mmneg(a);
f = mmcwatershed(e, d, mmsebox());
g = mmgray(f, 'uint16', 1);
h1 = mmaddm(mmlabel(d), uint16(1));
h = mmintersec(mmgray(d,'uint16'), h1);
i = mmunion( g, h);
j = mmgradm( a);
k = mmcwatershed(j, i);
mmshow(a);
mmshow(c);
mmshow(d);
mmshow(f,d);
mmshow(j);
mmshow(a,k);
a c d f,d
j a,k

[hofig7s13] [Up] [hofig7s17] http://www.python.org