Toolbox ia870 | List of Figures | Fig. 3.18 | Fig. 3.20

Figure 3.19 - Conjunctive and disjunctive opening

Description

A disjunctive opening (or reconstructive -opening) is defined by a union of reconstructive openings:

where is the structuring element responsible for the selected connectivity.

A conjunctive opening is defined by an intersection of reconstructive openings:

Disjunctive and conjunctive opening are illustrated in Fig. 3.19: (a) the input image, (b) the reconstructive opening by a long vertical element  , (c) the reconstructive opening by a short horizontal element  , (d) disjunctive opening, and (e) conjunctive opening. The output of the disjunctive operator consists of all characters containing either horizontal or vertical elements and the output of the conjunctive opening contains all characters containing both horizontal and vertical elements.

Demo Script

 1 import ia870 as MT
 2 
 3 A = adreadgray('MVBook/text2.png') > 0
 4 B1 = MT.iasedil(MT.iasebox(),MT.iaserot(MT.iaseline(20),90))
 5 C = MT.iaopenrec(A,B1,MT.iasebox())
 6 B2 = MT.iasedil(MT.iasebox(),MT.iaseline(15))
 7 D = MT.iaopenrec(A,B2,MT.iasebox())
 8 E = MT.iaunion(C,D)
 9 F = MT.iaintersec(C,D)
10 
11 adshow(MT.iapad(MT.ianeg(A)), '(a)')
12 adshow(MT.iapad(MT.ianeg(C)), '(b)')
13 adshow(MT.iapad(MT.ianeg(D)), '(c)')
14 adshow(MT.iapad(MT.ianeg(E)), '(d)')
15 adshow(MT.iapad(MT.ianeg(F)), '(e)')

(a)

(b)

(c)

(d)

(e)