The observation model I designed for tracking multiple C. elegans consists of two components, a region model and a contour model. The region model was designed to improve tracking performance in situations like Figure 5.4 where, despite strong edges, it is difficult to localize the worm in the axial direction during the partial occlusions common to mating behavior. The region model tries to maximize the overlap between the geometric models and worm pixels. To complement the region- based approach, a contour model that uses local edge feature points, similar to the one presented in Section 4.4, is also utilized. Here I explain the details of each approach, while Figure 5.4 provides an illustration of the complete observation model.
Frame 54
Figure 5.4: Despite the presence of strong edges, it is difficult to localize the worm in the axial direction during partial occlusions present in mating.
5.4.1 Region Model
Although the Chan and Vese model (Section 2.5) can be applied directly to grayscale images, I apply it to binary images that are calculated using a simple background subtraction model (Figure
RENDER
Generate Distance Map
Kalman Update
MINIMIZE E(p) = 12h
Ecv(p) +kp^¡pk2Pi
Iterate
Background Subtraction
Á implicitly Á(p)
defines ¡
Calculate Image Statistics Ecv(p) Chan-Vese Model,
Weighted Statistical Linear Regression
Region Based Tracking
Kalman Update
Iterate
Calculate Normal Displacement
Weighted Statistical Linear Regression
1D Measurement Line
Ik
Current Frame
Nearest Neighbor Data Association
Edge Feature Points
MINIMIZE E(p) = 12h
kz¡h(p)k2R+kp^¡pk2Pi
Edge Detection Operator
, measurement
z
Edge Based Tracking
^ p
¤P
¤H(p) IH(p)
H(p)
Figure 5.5: Overview of observation model used in multi-worm tracking. The worm models are rendered to a binary image using the desired camera model. The extracted boundaries are used to create a distance map φ(p) that implicitly defines the contour. The Chan-Vese functional is incorporated into the error metric and minimized using a SPKF. The output of the region model is used as an initial estimate that is refined using local edge feature points. Feature points are detected by performing 1D search along the normal to the model contour. The distance between the points is also minimized using the SPKF.
=
Figure 5.6: Because the background of the petri dish remains largely static, accurate segmentation of the observed data imagesIk is achieved using background subtraction.
5.6). Because microscope lighting effects may cause regions of the worm to be nearly camouflaged in the background, I determine the pixels belonging to the worm by background subtraction instead of relying on the image functional to partition the image based on the distribution of grayscale intensities. This approach is primarily used to provide improved tracking of multiple organisms, as I do not currently constrain the shape priors to prevent intersection of different worms because this occurs frequently in the intended applications.
The binary image serves as the data observation at the kthframe, zk =Ik. An overview of the worm observation model is illustrated in Figure 5.7. The rendered image of each organism model defined by (3.15) is joined to create the total imageIH(p) =SK
i=1Render(H(pi)). The boundaries of this image are extracted using the built in MatlabTMfunctionbwboundaries. Once the boundary locations∂Ωhave been found, the values ofc1 andc2 can be calculated directly. I first determine the domains:
ΩI =
(xi, yi)|IH(p)(xi, yi) = 1,(xi, yi)∈/ ∂Ω (5.7) ΩO=
(xi, yi)|IH(p)(xi, yi) = 0 , (5.8)
which determine the sets of pixels inside and outside the worm boundary, respectively. The obser- vation modelh(p)is then calculated as follows:
h(p) =
c1=
PN
i Ik(xi,yi)
N (xi, yi)∈ΩI S
∂Ω c2=
PM
i Ik(xi,yi)
M (xi, yi)∈ΩO.
(5.9)
I assume that the image pixels are corrupted by additive noise with unit variance,ωk∼ N(0,I).
Using this model, the observation dimension is equal to the number of pixels in the image. To decrease the computational cost associated with inverting the observation covariance in the Kalman filter update step, I make two modifications. First, Ik is trimmed to the smallest window that contains the closed boundaries that belong to the worms. I also subsample the imagesIk andIF(p) using a standard Gaussian pyramid with unit variance. The observation update is then performed at a level 2 of the pyramid where level 0 is the original resolution (see Fig. 5.7a).
5.4.2 Contour Model
The contour observation model is illustrated in Figure 5.7b and is identical to that used for zebrafish tracking (Section 4.4). It consists of the model boundary points,qi= xyii
, along with their outward normal vectors, ni = n
x i
nyi
To find corresponding edge-feature points, the approach of Blake [8] is utilized by applying a 1D edge detector filter toIk in the normal direction at each of the boundary points in the model. The nearest neighbor detected edge points, ri, are also projected onto ni so that the error minimized by the KF has the form nT(q−r). I also make two additions to this contour model. A closed B-Spline curve is fit to the boundaries ofIk and locations of high negative curvature are calculated. These feature points likely correspond to head and tail locations and are matched with the model if they pass a Mahalanobis test1(i.e.,kqi−rikΣi ≤γ, from Eq. (2.39)) and have a similar normal vector orientation. Here,Σi =hσ2
x σ2xy σxy2 σ2y
i
is the covariance matrix associated with the model point qi. Also, due to their cylindrical shape, the worms never share a visible boundary while they interact (i.e., their centerlines are almost never coincident and parallel in any region). This constraint is incorporated by rejecting any detected edge points for one worm where the measurement lines cross over the model location of other worms. This idea is also modeled in [87] using a “worm overlap energy” and is a simpler notion of the exclusion principle presented in [68].
1For normally distributed measurements, the Mahalanobis distance is chi-squared distributed with number of degrees of freedom equal to the dimension of measurement vector—2 in this case. The probability that the distance is less than the parameterγcan, therefore, be obtained fromχ2distribution tables. For example,γ= 5.99corresponds to a 95% probability that the featureriis associated with the model pointqi.
10 20 30 40 10
20
30
40
(a) (b)
Figure 5.7: Observation models, h(pk, ωk) used in the proposed tracker: (a) Illustration of the observation model for region-based tracking. Initial condition (red) and final solution (green) are plotted over the subsampled data image, Ik. Contours represent the zero level set of φ(pk). The contour has to be evolved little because the motion model provides a good initial estimate and the motion between frames is small; (b) Observation model for contour-based tracking. Edge features are detected along 1D measurement lines. Model locations are labeled as occluded (yellow stars) if no match is detected. High curvature points (red squares) are matched with head/tail locations.