## 3 Target Detection and Tracking Algorithm
### Feature Points Tracking-Based Algorithm for Square Checkerboard Patterns
Then, a response function \(\Gamma(x,y)\) is defined at each pixel based on its spatial gradient matrix \([M]\)[38]: \[\Gamma(x,y)=\det(M(x,y))-0.04(\mathrm{Tr}(M(x,y)))^{2}\] (2) Nonmaximal suppression with a \(3\times 3\) window is applied to the calculated response function values to avoid double detection of the corner points. It is noted that the conventional Harris-Stephens feature detection algorithm can only achieve pixel level detection. Therefore, a quadratic interpolation is applied to obtain the sub-pixel coordinates (\(u,v\)) of the corner points [39]: \[ \begin{bmatrix}u\\ v\end{bmatrix} = \begin{bmatrix}u_{0}\\ v_{0}\end{bmatrix} - \begin{bmatrix}I_{xx}&I_{xy}\\ I_{xy}&I_{yy}\end{bmatrix} ^{-1} \begin{bmatrix}I_{x}\\ I_{y}\end{bmatrix} \] (3) where (\(u_{0}\), \(v_{0}\)) are the coordinates of corner points with pixel level accuracy from the conventional Harris-Stephens feature detection; \(I_{x}\) and \(I_{y}\) are the spatial gradients calculated at (\(u_{0}\), \(v_{0}\)); and \(I_{xx}\), \(I_{yy}\), and \(I_{xy}\) are the derivatives of the spatial gradients calculated at (\(u_{0}\), \(v_{0}\)). The 16 detected corner points with sub-pixel level accuracy for a Type 2 target are plotted with the yellow crosses in Figure 4e. The geometric center of the target in the image frame, which is plotted as the red cross in Figure 4e, is determined by the mean coordinates of all detected corner points. Given the sub-pixel coordinates of the detected corner points in the reference video frame, a Kanade-Lucas-Tomasi (KLT) feature tracker [32; 33] is initialized with these corner points to track their movements in the remaining video frames. With the tracked corner points in each video frame, the geometric center of the target is computed. The algorithm  
Figure 4: Procedure to detect corner points and extract the target center in the first video frame for square checkerboard patterns (example shown for a Type 2 target). can then return to a time series of the located geometric center of each target with sub-pixel level accuracy. Sample corner point detection and target center extraction results for various square checkerboard patterns are shown in Figure 5. Good visual alignments are observed for both the bounding box extraction (blue boxes) and the corner points detection (yellow crosses). It is worth mentioning that the number of extracted corner points is different for each pattern. Type 1 (5-tile) and Type 2 (4-tile) targets have 16 corner points, while the other 2-tile targets have only 9 corner points. During the implementation, some unidentified points are noted for Type 3\({}_{\text{R}}\) and Type 3\({}_{\text{S}}\) targets. As a red-and-white pattern, Type 3\({}_{\text{R}}\) has less contrast between the red square pattern and background after converting the colored image into grayscale. Therefore, detection of the two corner points between the red squares and the background becomes less reliable. For the Type 3\({}_{\text{S}}\) target, the side length of the black square in the pattern is 5 cm, corresponding to only four to five pixels in the video frame. This small size reduces the values in the spatial gradient matrix of the corner point because of the lower contrast between the pattern region and background, leading to a reduction in the value of the response function \(\Gamma(x,y)\) for the corner point. As a result, the proposed algorithm provides less reliable detection for the two corner points between the black squares and the background. Since these unreliable detections are associated with small response function values, only the corner points corresponding to the seven largest response function values after nonmaximal suppression are selected as the detected corner points for Type 3\({}_{\text{R}}\) and Type 3\({}_{\text{S}}\) targets. Two corner points between the colored square and the background are excluded in the detection. This operation ensures the robustness of each detected corner point.