Toolbox ia870 | List of Figures | Fig. 5.18 | Fig. 5.29

Figure 5.20 - Flat dilation versus threshold decomposition

Description

Figure 5.20 illustrates the gray-scale flat dilation by a circular disk. At the right of the gray-scale images (original and dilated), there are three threshold sets, at gray levels 50, 100, and 200, respectively. A practical characteristic of a stack filter is that it stores all results of the filtering of the input thresholded images.

Demo Script

 1 import ia870 as MT
 2 
 3 f = adreadgray('MVBook/teclas.png')
 4 adshow(f,title="f")
 5 
 6 X50 = MT.iathreshad(f,50)
 7 adshow(MT.ianeg(X50), 'X50(f)')
 8 
 9 X100 = MT.iathreshad(f,100)
10 adshow(MT.ianeg(X100),'X100(f)')
11 
12 X200 = MT.iathreshad(f,200)
13 adshow(MT.ianeg(X200),'X200(f)')
14 
15 B = MT.iasedisk(4)
16 
17 fdil = MT.iadil(f,B)
18 adshow(fdil,'f+B')
19 
20 X50dil = MT.iadil(X50,B)
21 adshow(MT.ianeg(X50dil),'X50(f) + B')
22 
23 X100dil = MT.iadil(X100,B)
24 adshow(MT.ianeg(X100dil),'X100(f) + B')
25 
26 X200dil = MT.iadil(X200,B)
27 adshow(MT.ianeg(X200dil),'X200(f) + B')

f

X50(f)

X100(f)

X200(f)

f+B

X50(f) + B

X100(f) + B

X200(f) + B