[hofig7s23] [Up] [hofig8s2] Chapter 7 - Morphological Segmentation - Watershed

hofig7s26
Silver-halide T-grain crystals analysis

Description

This figure illustrates the analysis of Silver-halide T-grain crystals.

Demo Script

.

from morph import *
a = mmreadgray('crystals.tif');
b = mmasf(a,'oc',mmsedisk(2,'2D','octagon'),10); # background estimation
c = uint8(mmstats(b,'min')* a/b);
d = mmcloseth( c,mmsedisk(4,'2D','octagon'));
e = mmhmin(mmareaclose(d,7),8);
f = mmwatershed(e);
g = mminfrec(mmframe(f),mmneg(f));
h = mmintersec(f,mmneg(mmclose(g)));
mmshow(a);
mmshow(b);
mmshow(c);
mmshow(d);
mmshow(e);
mmshow(f);
mmshow(g);
mmshow(h);
mmshow(a,h,h);
a b
c d
e f
g h
a,h,h

[hofig7s23] [Up] [hofig8s2] http://www.python.org