[hofig6s29] [Up] [hofig7s2] Chapter 7 - Morphological Segmentation - Watershed

hofig7s1
Segmentation by thresholded gradient

Description

This figure illustrates the segmentation by thresholded gradient.

Demo Script

.

from morph import *
from MLab import transpose
f=transpose(mmreadgray('beef.tif'));
g=mmgradm(f,mmsebox());
g50=mmthreshad(g,50);
Warning: Converting input image from int32 to uint8.
g100=mmthreshad(g,100);
Warning: Converting input image from int32 to uint8.
mmshow(f)
mmshow(g)
mmshow(g50)
mmshow(g100)
f g
g50 g100

[hofig6s29] [Up] [hofig7s2] http://www.python.org