4.6 Distance transforms
4.6.3 Chamfer masks
Algorithm 2: Chamfer map
Input: A set of confocal z-stacks of the plant ER
We assume that the size of the data in the x, y and z directions to be Ix, Iy, Iz respectively.
Output: Distance map ER images
Forward scan; 1 for z = 0to Iz−1 do 2 for y= 0to Iy −1do 3 for x= 0 to Ix−1do 4
I(p(x, y, z)) = min(I(p),minvk∈Mf orward
C (I(p+v k) +wk)); 5 end 6 end 7 end 8 Backward scan; 9 for z =Iz−1 to 0 do 10 for y=Iy −1 to 0do 11 for x=Ix−1 to 0do 12
I(p(x, y, z)) = min(I(p),minvk∈Mbackward
C (I(p+vk) +wk)); 13 end 14 end 15 end 16
Rosenfeld & Pfaltz(1966) sequentially achieves the same result, in 2D, in two scans using two symmetric masks (chamfer masks), such as the ones in Figure 4.6 on page 78. In the case of this mask there are three weights denoted ω1,ω2, and ω3.
After initialising the image, i.e. after assigning 0 to all points in the background and 1 to those in the foreground,Rosenfeld & Pfaltz’s algorithm performs two scan
80 Chapter 4. Skeleton Extraction
(Algorithm 2on page 79):
(i) A forward scan (top left to bottom right): Starting at the top left point in the image, the forward scan operates as follows: (a) the algorithm assigns to each point in the forward neighbourhood the sum of its value in the current iteration and its corresponding weight (note that all those points have already been processed since the image is processed from the top-left to the bottom right), (b) then it compares the new values of all forward neighbourhood points with that of the centre point, and finally (c) it assigns the minimum value to the centre point.
(ii) A backward scan (bottom right to top left): Using the result of the forward scan as the initial image, the backward scan follows the same logic, but in the reverse order, i.e. starting at the bottom right point of the image and using the backward neighbourhood.
Figure4.6 on page78 shows examples of chamfer masks in 2D and 3D.
The following is a formal definition of chamfer masks (Fouard,2005)
Definition 4.6.4. Let (E, A) be a module, where E =Z3 is the abelian group and
A is the ring, and let F be a subgroup of R. A chamfer mask Mc with weights
w= (wk) is a finite set of vectors
MC ={(vk, wk)∈E×F,16k 6m}
which have at least one base in E, and which meets the following requirements: (1) ∀ k∈E wk >0 and vk 6= 0
(2) ∀ (v, w)∈ Mc ((±vi), w)∈ Mc where v = (vi).
The shortest path between a point in the foreground and the background (known as chamfer distance), provides an approximation of its Euclidean distance. The path
4.6 Distance transforms 81
between a point p in the foreground and a point q in the background is a linear combination of chamfer vectors and is defined as follows:
Definition 4.6.5. LetMC be a chamfer mask, and let p, q∈E,a path fromp to q is the sum of vectors vk ∈ MC starting at p, and ending atq,
Ppq =
X
vk∈MC
λkvk whereλk∈R and λk >0; ∀ k
The cost associated to path Ppq is given by
W(Pp,q) = m
X
k=1
λk·ωk.
Definition 4.6.6. Letpand qtwo points inE, the chamfer distancedC between pand q is the minimum cost associated to all paths betweenp and q
dC = minPpqW(Pp,q).
Given a module (E, A), a chamfer mask MC ∈ C(E, A, F), and a subgroup in R,
Verwer (1991) shows that dC is a distance in E
Proposition 4.6.7. Let (E, A) be a module, and let F be a subgroup of R. If MC ∈ C(E, A, F) is a mask, then the corresponding chamfer distance dC is a distance inE.
Details and theory of distance maps have been formulated and thoroughly in- vestigated in Bertrand & Malandain (1994); Cuisenaire (1999); Kong & Rosenfeld
(1989); Malandain et al. (1993); Rosenfeld (1975); Rosenfeld & Pfaltz (1966), and the most important aspect of them from the point of view of this thesis is their error with respect to the Euclidean distance;Fouard et al. (2006) reports that with a 3×3×3 mask, the maximum error between chamfer maps and
82 Chapter 4. Skeleton Extraction
the euclidean distance is 6.5% and the number of operations required to achieve this approximation amounts to 13 per voxel. With a 5×5×5 mask, the maximum error is 2.5% and the number of operations per voxel is 37. Finally with a 7×7×7 mask, the maximum error is around 2.0% with 97 operations on each voxel. This means that if the diameter of the solid ER is around a 200 nm then the maximum error in the measurement of the diameter is around 13 nm which is well below the confocal resolution power (see Chapter 3.)
4.7
Chapter Summary
This chapter has shown that denoising the images of the solid ER requires two basic filters; the median filter to remove salt-and pepper noise and close tiny holes, and the Gaussian filter to obtain smooth skeletons. It has also explained the two approaches to binarise the image: (a) the global approach where the same useable threshold value, chosen from a range of useable thresholds, is applied to whole image, and (b) the adaptive approach where the image is split into smaller regions and the local threshold value is calculated on basis of the mean and standard deviation of the pixels with that region. It has also shown that the Distance Ordered Homotopic Thinning algorithm yields thin, medial, homotopic skeletons that conserve the ho- motopy type of the original shape, and concluded that it is best used with chamfer maps because they can rapidly be computed and offer good approximation to the euclidean distance and can be rapidly computed.
5
Motion Analysis
Chapter4has reviewed the different skeleton extraction methods that are currently used, both in the case of continuous as well as discrete data. It has concluded that distance ordered homotopic thinning technique offers a good trade-off between cost and accuracy. This technique yields thin, homotopic, and medial skeletons, that can be used to quantify the ER. This chapter uses a simplified version of the feature point tracking and trajectory analysis for video imaging algorithm developed by
Sbalzarini & Koumoutsakos (2005). We use this algorithm to track, analyse, and quantify the movement of the solid ER based on the reconstruction of its skeleton.
84 Chapter 5. Motion Analysis
5.1
Introduction
We observe the motion of the solid ER using Leica TCS SP2 (or SP5) confocal microscope (see Section 3.2 on page 29), which generates a series of digital images called a movie, at discrete time steps (called frames). Following the skeletonisation algorithm in Chapter 4, we transform this series of confocal images into a series of binary skeletons, from which we remove interior points to obtain a simplified graph representation of the specimen, where the vertices are geometric, i.e. they occupy the same spatial positions as the central points of the solid ER junctions (see Figure 5.1 on page 84).
To track the positions of the skeleton vertices, we useCrocker & Grier(1996)’s algo- rithm, and then exploit the improvements introduced bySbalzarini & Koumoutsakos
(2005), and hence follow the notation adopted therein. We refer to the images of the vertices as feature points (or simply points). Crocker & Grier ’s algorithm con- sists of two main steps: (a) point detection, and (b) trajectory reconstruction. The former is essentially the identification of the moving points in all frames, and the latter is the linking of their locations in different frames to build their trajectories. The term false detection refers to the case where we detect a point where there is none, and the term spurious detection refers to the case where we correctly detect
(a) Raw image (b) Skeleton (c) A geometric graph Figure 5.1: An illustration of tracking the solid ER junctions. Scale bar 1.0µm