Toolbox ia870 | List of Figures | Fig. 6.20 | Fig. 6.24

Figure 6.21 - Connected flat alternating sequential filtering

Description

Figure. 6.21 illustrates gray-scale image filtering using alternating sequential filters: (a) input image; (b) two-stage ASF based on close-open; (c) two-stage reconstructive ASF based on close-open; and (d) area open followed by area close.

Demo Script

 1 import ia870 as MT
 2 
 3 f = adreadgray('csample.jpg')
 4 
 5 a = f[:128,:128]
 6 b = MT.iaasf(a,'oc',MT.iasecross(),2)
 7 c = MT.iaasfrec(a,'oc',MT.iasecross(),MT.iasecross(),2)
 8 
 9 d = MT.iaareaclose(MT.iaareaopen(a,30),30)
10 
11 adshow(MT.iapad(a),'(a)')
12 adshow(MT.iapad(b),'(b)')
13 adshow(MT.iapad(c),'(c)')
14 adshow(MT.iapad(d),'(d)')

(a)

(b)

(c)

(d)