Toolbox ia870 | List of Figures | Fig. 6.2 | Fig. 6.5

Figure 6.4 - Gray-scale top-hat

Description

Figure 6.4 illustrates the use of the open top-hat to detect the narrow structures in the image. This same picture was used to illustrate the gray-scale opening (Fig. 5.29) detecting the round seeds. The corresponding open top-hat can detect the fine branches where the seeds are connected.

Demo Script

 1 import ia870 as MT
 2 
 3 f = adread('MVBook/bunch-seeds.jpg')
 4 D = MT.iasedisk(3)
 5 g = MT.iaopen(f,D)
 6 gth = MT.iaopenth(f,D)
 7 
 8 adshow(f,'(a) input image')
 9 adshow(g, '(b) opened image')
10 adshow(MT.ianeg(gth), '(c) open top-hat (negated for visualization)')

(a) input image

(b) opened image

(c) open top-hat (negated for visualization)