[hofig8s20] [Up] Chapter 8 - Granulometries

hofig8s22
Local gray-scale granulometry

Description

This figure illustrates local gray-scale granulometry.

Demo Script

.

from morph import *
from Numeric import conv2, ones
cannot import name conv2
f=mmreadgray('lake.tif');
f=mmintersec(f,mmneg(mmframe(f)));
h1,f1=mmlgranuleq(f,'octagon');
name 'mmlgranuleq' is not defined
h2,f2=mmlgranuleq(f,'octagon-nf');
name 'mmlgranuleq' is not defined
y1=uint8(conv2(f1,ones(10,10),'same')/conv2(double(f),ones(10,10),'same'));
name 'conv2' is not defined
y2=uint8(conv2(f2,ones(10,10),'same')/conv2(double(f),ones(10,10),'same'));
name 'conv2' is not defined
mmshow(y1)
name 'y1' is not defined
mmshow(y2)
name 'y2' is not defined

[hofig8s20] [Up] http://www.python.org