Toolbox ia870 | List of Figures | Fig. 3.32 | Fig. 3.34

Figure 3.33 - Distance transform and erosion

Description

This figure illustrates the equivalence between the distance transform and erosions by disks.

Demo Script

 1 import ia870 as MT
 2 import ia636 as ia
 3 
 4 f = adreadgray('blob.tif') > 0
 5 f1 = MT.iaero(f,MT.iasedisk(6))
 6 f2 = MT.iaero(f,MT.iasedisk(12))
 7 f3 = MT.iaero(f,MT.iasedisk(18))
 8 
 9 adshow(MT.ianeg(f), '(a) input image')
10 adshow(MT.ianeg(f1), '(b) eroded by D(6)')
11 adshow(MT.ianeg(f2),'(c) eroded by D(12)')
12 adshow(MT.ianeg(f3), '(d) eroded by D(18)')

(a) input image

(b) eroded by D(6)

(c) eroded by D(12)

(d) eroded by D(18)