Figure 3.18 - Reconstructive opening top-hat
The top-hat concept can be applied to reconstructive opening producing the reconstructive opening top-hat:
In this case, the operator reveals the objects that do not exhibit a fitting criterion. For instance, to detect thin objects, one can use a disk of diameter larger than the thickest of the thin objects. Figure 3.18 illustrates this situation. The reconstructive opening has detected the suite-objects of the cards as a disk can be fit into them, and the reconstructive opening top-hat has detected the number-objects as a disk cannot be fit.
1 import ia870 as MT 2 3 f = adreadgray('MVBook/cards.png')>0 4 A = MT.iaareaopen(MT.iaedgeoff(f),50) 5 adshow(MT.iapad(MT.ianeg(A)),'(a) input image') 6 7 B = MT.iasedisk(5) 8 9 C = MT.iaopen(A,B) 10 adshow(MT.iapad(MT.ianeg(C)),'(b) opening by disk') 11 12 D = MT.iaopenrec(A,B,MT.iasebox()) 13 adshow(MT.iapad(MT.ianeg(D)),'(c) reconstructive opening by disk') 14 15 E = MT.iaopenrecth(A,B,MT.iasebox()) 16 adshow(MT.iapad(MT.ianeg(E)),'(d) reconstructive opening top-hat by disk')