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

hofig7s19
Image simplification

Description

This figure illustrates image simplification using the watershed transform.

Demo Script

.

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);
f g

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