Toolbox ia870 | List of Figures | Fig. 3.19 | Fig. 3.21

Figure 3.20 - Reconstructive radial opening


If the base of the disjunctive opening is a set of linear structuring elements of varying angles, then the filter is called reconstructive radial opening. Figure 3.20 shows an illustration of the application of a radial opening and a reconstructive radial opening with angles varying from 0 to 180 deg with 2-deg steps. The filter detects all the pieces containing a long straight line.

Demo Script

 1 import ia870 as MT
 2 import numpy as np
 3 from handson.lib import iaropen
 5 A = adreadgray('pieces_bw.tif') > 0
 6 B = iaropen(A,28,np.arange(0,179,2))
 7 C = MT.iainfrec(B,A,MT.iasebox())
 9 adshow(MT.iapad(MT.ianeg(A)), '(a) input image')
10 adshow(MT.iapad(MT.ianeg(B)), '(b) radial opening')
11 adshow(MT.iapad(MT.ianeg(C)), '(c) reconstructive radial opening')

(a) input image

(b) radial opening

(c) reconstructive radial opening