Toolbox ia870 | List of Figures | Fig. 3.33 | Fig. 3.35

Figure 3.34 - Geodesic disks

Description

This figure illustrates Euclidean, chessboard and city-block geodesic disks

Demo Script

 1 import ia870 as MT
 2 import ia636 as ia
 3 
 4 A = adreadgray('MVBook/gletter.png') > 0
 5 B = MT.iasubm(A,A)
 6 B[61,77]=1
 7 
 8 #gdE = MT.iagdist(A,B, mmsebox(), 'EUCLIDEAN')
 9 gd8 = MT.iagdist(A,B,MT.iasebox())
10 gd4 = MT.iagdist(A,B,MT.iasecross())
11 
12 gd8m = MT.iaintersec(gd8,MT.iagray(MT.iathreshad(gd8,0,264)))
13 gd4m = MT.iaintersec(gd4,MT.iagray(MT.iathreshad(gd4,0,264)))
14 #gdEm = MT.iaintersec(gdE,MT.iagray(MT.iathreshad(gdE,0,264)))
15 
16 #adshow(ia.ianormalize(gdEm % 6))
17 adshow(ia.ianormalize(MT.ianeg(gd8m % 6)))
18 adshow(ia.ianormalize(MT.ianeg(gd4m % 6)))