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

Figure 6.6 - Detecting cells of a FISH image using open top-hat

Description

Figure 6.6 shows the open top-hat transform applied to a FISH image taken from a stack of images on multiple focal planes: (a) FISH image; (b) top-hat transform of the FISH image; (c) binary image resulting from thresholding the top-hat image; and (d) detail of the final result with an arrow indicating the position of each detected spot. Owing to noise, the top-hat methodology typically yields very small spots in the binary image. These can be eliminated by area open.

Demo Script

 1 import ia870 as MT
 2 
 3 Img = adreadgray('MVBook/fish_m.png')
 4 adshow(Img,'(a) FISH input image')
 5 
 6 Imgth = MT.iaareaopen(MT.iaopenth(Img,MT.iasedisk(4)),2)
 7 adshow(Imgth,'(b) Area open by 2 pixels of the open top-hat by a disk of radius 4')
 8 
 9 Img50 = MT.iabinary(Imgth,50)
10 adshow(Img50,'(c) Thresholding at grey level 50')
11 
12 SESeta = MT.iaseunion(MT.iaseunion((MT.iaseline(6,45)),(MT.iaseline(6,-45))),(MT.iaseline(10)))
13 
14 ImgCentroid  = MT.iablob(MT.ialabel(Img50,MT.iasebox()),'centroid')
15 
16 Out = MT.iaunion(Img,MT.iagray(MT.iadil(ImgCentroid,MT.iasetrans(SESeta,[0,5]))))
17 adshow(Out,'(d) Dilation of centroids by arrow, for illustration')
18 
19 zoom = Out[9:140,29:200]
20 
21 adshow(zoom,'(e) Detail of the rectangle marked on the previous image')

(a) FISH input image

(b) Area open by 2 pixels of the open top-hat by a disk of radius 4

(c) Thresholding at grey level 50

(d) Dilation of centroids by arrow, for illustration

(e) Detail of the rectangle marked on the previous image