[hofig4s6] [Up] [hofig4s8] Chapter 4 - Hit-or-Miss Transform

hofig4s7
Eight compass templates for sequential pruning

Description

This figure illustrates the eight compass templates for sequential pruning.

Demo Script

.

from morph import *
I0=mmendpoints('HOMOTOPIC')
I1=mminterot(I0,45)
I2=mminterot(I0,90)
I3=mminterot(I0,135)
I4=mminterot(I0,180)
I5=mminterot(I0,225)
I6=mminterot(I0,270)
I7=mminterot(I0,315)
print mmintershow(I0)
. 1 . 
0 1 0 
0 0 0
print mmintershow(I1)
0 . 1 
0 1 . 
0 0 0
print mmintershow(I2)
0 0 . 
0 1 1 
0 0 .
print mmintershow(I3)
0 0 0 
0 1 . 
0 . 1
print mmintershow(I4)
0 0 0 
0 1 0 
. 1 .
print mmintershow(I5)
0 0 0 
. 1 0 
1 . 0
print mmintershow(I6)
. 0 0 
1 1 0 
. 0 0
print mmintershow(I7)
1 . 0 
. 1 0 
0 0 0

[hofig4s6] [Up] [hofig4s8] http://www.python.org