Toolbox ia870 | List of Figures | Fig. 3.28 | Fig. 3.30

Figure 3.29 - Skeletonization by skeletal subsets

Description

This figure illustrates the skeletonization by skeletal subsets:

(Fig. a) ;

(Fig. b) ;

(Fig. c)

and (Fig. d)

Demo Script

 1 import numpy as np
 2 import ia870 as MT
 3 
 4 S= MT.iabinary([
 5   [0,0,0,0,0,0,0,0,0],
 6   [0,0,0,0,1,0,0,0,0],
 7   [0,0,0,1,1,1,0,0,0],
 8   [0,0,0,1,1,1,0,0,0],
 9   [0,0,1,1,1,1,1,0,0],
10   [0,1,1,1,1,1,1,1,0],
11   [0,1,1,1,1,1,1,1,0],
12   [0,1,1,1,1,1,1,1,0],
13   [0,1,1,1,1,1,1,1,0],
14   [0,1,1,1,1,1,1,1,0],
15   [0,0,0,0,0,0,0,0,0]])
16 
17 fig1a = MT.iaero(S,MT.iasebox(0))
18 fig2a = MT.iaero(S,MT.iasebox(1))
19 fig3a = MT.iaero(S,MT.iasebox(2))
20 
21 fig1b = MT.iaopen(MT.iaero(S,MT.iasebox(0)),MT.iasebox())
22 fig2b = MT.iaopen(MT.iaero(S,MT.iasebox(1)),MT.iasebox())
23 fig3b = MT.iaopen(MT.iaero(S,MT.iasebox(2)),MT.iasebox())
24 
25 fig1c = MT.iaopenth(MT.iaero(S,MT.iasebox(0)),MT.iasebox())
26 fig2c = MT.iaopenth(MT.iaero(S,MT.iasebox(1)),MT.iasebox())
27 fig3c = MT.iaopenth(MT.iaero(S,MT.iasebox(2)),MT.iasebox())
28 
29 fig1d = fig1c
30 fig2d = MT.iaunion(fig1c,fig2c)
31 fig3d = MT.iaunion(fig1c,fig2c,fig3c)
32 
33 adshow(MT.ianeg(MT.iabshow(S,fig1a)))
34 adshow(MT.ianeg(MT.iabshow(S,fig1b)))
35 adshow(MT.ianeg(MT.iabshow(S,fig1c)))
36 adshow(MT.ianeg(MT.iabshow(S,fig1d)))
37 adshow(MT.ianeg(MT.iabshow(S,fig2a)))
38 adshow(MT.ianeg(MT.iabshow(S,fig2b)))
39 adshow(MT.ianeg(MT.iabshow(S,fig2c)))
40 adshow(MT.ianeg(MT.iabshow(S,fig2d)))
41 adshow(MT.ianeg(MT.iabshow(S,fig3a)), '(a)')
42 adshow(MT.ianeg(MT.iabshow(S,fig3b)), '(b)')
43 adshow(MT.ianeg(MT.iabshow(S,fig3c)), '(c)')
44 adshow(MT.ianeg(MT.iabshow(S,fig3d)), '(d)')

(a)

(b)

(c)

(d)