Figure 5.30 - Radial opening
Like in the binary case, the most popular gray-scale -opening is the flat radial opening. Figure 5.30 shows a radial opening using rotated linear structuring elements from 0-deg to 180-deg in steps of 15-deg. Note how the opening has marked only straight elongated pasta chips.
Like opening, the gray-scale closing is defined analogously to the binary case:
Duality takes the form
1 import ia870 as MT 2 import numpy as np 3 from handson.lib import iaropen 4 5 f = adreadgray('MVBook/pasta.jpg') 6 g = iaropen(f,65,arange(0,175,15)) 7 8 adshow(f,'(a) input image') 9 adshow(MT.iagsurf(f), '(b) surface view of the input image') 10 11 adshow(g, '(c) radial opening') 12 adshow(MT.iagsurf(g), '(d) top-view surface of the radial opening.')