[hofig7s26] [Up] [hofig8s3] Chapter 8 - Granulometries

hofig8s2
Family of octagonal disks

Description

This figure illustrates a family of octagonal disks with increasing radius of 0, 1, 2, 3, 4 and 5 pixels.

Demo Script

.

from morph import *
from Numeric import zeros, arange, shape
r=arange(0,6);
w= 2*r[-1] + 1;
z=mmbinary(zeros((w,w)));
z[shape(z)[0]/2,shape(z)[1]/2]=1;
y=mmbinary([]);
for i in r:
  o = mmdil(z,mmsedisk(i,'2D','octagon'));
  y = mmconcat('W',y, o);
mmshow(mmbshow(y,y));
mmbshow(y,y)

[hofig7s26] [Up] [hofig8s3] http://www.python.org