Toolbox ia870 | List of Figures | Fig. 4.12 | Fig. 5.20

Figure 5.18 - Illustration of gray-scale erosion by a flat disk

Description

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.

Demo Script

 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' )

(a) Input image

(b) Surface view of de input image

(c) Erosion by Euclidean disk

(d) Surface view of the eroded image