Toolbox ia870 | List of Figures | Fig. 6.12 | Fig. 6.14

Figure 6.13 - Gray-scale morphological reconstruction by means of threshold decomposition

Description

Since the binary morphological reconstruction is monotonically increasing, it can be used in the stack filter framework. In this sense, gray-scale morphological reconstruction using flat structuring elements can be implemented by means of threshold decomposition. Specifically, thresholding commutes with reconstruction:

This property is useful to better visualize the mechanism of the gray-scale reconstruction. Figure 6.13 illustrates this with the same example of Fig. 6.12. The figure shows several threshold sets and their reconstructions. Where :

(a.) , (b) , (c) , (d) , (e) and (f)

Demo Script

 1 import ia870 as MT
 2 
 3 f = adreadgray('MVBook/bunch-seeds.jpg')
 4 f1 = MT.iathreshad(f, 100)
 5 f2 = MT.iathreshad(f, 150)
 6 
 7 m = MT.iasubm(f,f)
 8 m[141,310]=255
 9 m = MT.iadil(m, MT.iasedisk(10))
10 
11 g = MT.iainfrec(m,f)
12 g1 = MT.iathreshad(g,100)
13 g2 = MT.iathreshad(g,150)
14 
15 adshow(MT.iapad(MT.ianeg(MT.iaunion(f,m))),'(a)')
16 adshow(MT.iapad(MT.ianeg(f1)),'(b)')
17 adshow(MT.iapad(MT.ianeg(f2)),'(c)')
18 adshow(MT.iapad(MT.ianeg(g)),'(d)')
19 adshow(MT.iapad(MT.ianeg(g1)),'(e)')
20 adshow(MT.iapad(MT.ianeg(g2)),'(f)')

(a)

(b)

(c)

(d)

(e)

(f)