Toolbox ia870 | List of Figures | Fig. 1.16 | Fig. 1.18

Figure 1.17 - Bounded erosion

Description

For image and structuring element the bounded erosion is defined as

  After translation the structuring element is restricted to the view before verifying that it fits within the input image. If all translations of the structuring element are subsets of the view, then the bounded erosion equals the ordinary erosion. Note that the view of the output image is the same as the input image. Figure 1.17 illustrates the bounded and the ordinary erosions

Demo Script

 1 import ia870 as MT
 2 
 3 S = MT.iabinary([
 4   [1,1,1,1,1,1,1],
 5   [1,1,1,1,1,0,0],
 6   [0,1,1,1,0,0,0],
 7   [1,1,1,0,0,1,0],
 8   [1,1,1,0,0,0,0],
 9   [1,0,1,1,1,1,1],
10   [1,0,0,0,1,1,0]])
11 
12 frame = MT.iaunion(S,1)
13 
14 adshow(MT.ianeg(MT.iabshow(frame,S)), '(a) input image')
15 
16 E = MT.iaimg2se(MT.iabinary([
17   [1,1,1],
18   [1,1,0],
19   [1,0,0]]))
20 
21 adshow(MT.ianeg(MT.iaseshow(E,'EXPAND')), '(b) structuring element')
22 
23 T1 = MT.iaero(S,E)
24 adshow(MT.ianeg(MT.iabshow(frame,T1)), '(c) bounded erosion')

(a) input image

(b) structuring element

(c) bounded erosion