Figure 5.18 - Illustration of gray-scale erosion by a flat disk
An example of gray-scale flat erosion by a disk on a gray-scale image is shown in Fig. 5.18. The two images on the left, input and eroded, are represented in grayscale shades and the two on the right are the same images represented by their top-view surfaces.
1 import ia870 as MT 2 3 f = adreadgray('n2538.tif') 4 D = MT.iasedisk(3) 5 g = MT.iaero(f, D) 6 fs = MT.iagsurf(f) 7 gs = MT.iagsurf(g) 8 9 adshow(f, title = '(a) Input image' ) 10 adshow( fs, title = '(b) Surface view of de input image' ) 11 adshow( g, title = '(c) Erosion by Euclidean disk' ) 12 adshow( gs, title = '(d) Surface view of the eroded image' )