# Comparative Analysis of Discrete Subtraction and Cross-Correlation for Subpixel Object Tracking
## 3 Results and Discussion
\begin{table}
\begin{tabular}{c c c c c} \hline  & **DSM** & **Correlation** & **DSM** & **Correlation** \\  & **Max Abs Shift** & **Max Abs Shift** & **Mean Shift \(\pm\) STD** & **Mean Shift \(\pm\) STD** \\ \hline Square & 0.015 & 0.069 & 0.0013 \(\pm\) 0.0064 & 0.0013 \(\pm\) 0.0039 \\ Circle & 0.007 & 0.007 & 0.0013 \(\pm\) 0.0014 & 0.0013 \(\pm\) 0.0012 \\ Gaussian & 0.046 & 0.021 & 0.0013 \(\pm\) 0.0166 & 0.0013 \(\pm\) 0.0057 \\ Mule & 0.017 & 0.007 & 0.0013 \(\pm\) 0.0057 & 0.0013 \(\pm\) 0.0016 \\ \hline \end{tabular}
\end{table} 
Table 1: Incremental shift detected for the DSM and Correlation methods for 2000 frames in the middle of the trajectory. All units are given in mm. Figure 4: Frame-by-frame calculated displacement for the four targets implemented for 2000 frames in the middle of the trajectory. happened because the acquisition time of the total sequence was a little longer than the total displacement time in all the movement graphs. Thus, it is easier to identify the initial and final positions and the exact duration of the movement phase. Figure 5: Calculated position of the squared target using DSM and correlation methods. Figure 6: Calculated position of the circular target using DSM and correlation methods. At first sight, one can see that tracking results from both methods are practically overlapped in the three first cases (Figures 5-7). In some graphs, one can see some oscillations that are followed by both methods and are probably due to inaccuracies in the carrying stage. We would like to draw the reader's attention to the case of the squared target. Contrary to the other three cases, the square target when tracked through correlation does not present a monotonous trend but four small oscillations, which correspond to the sudden jumps already observed in Figure 4. These oscillations can be better seen in Figure 9, where a magnification of Figure 5 is presented. There, one can appreciate that the position of the target is underestimated with respect to the DMS graph, and suddenly, when the target  
Figure 8: Calculated position of the male target using DSM and correlation methods. Figure 7: Calculated position of the Gaussian target using DSM and correlation methods. has travelled one there is an overcorrection. This effect of periodical correction can also be observed in the DSM graph for this target in Figure 4, although it happens at different positions. This effect was also observed in our previous numerical simulations and is a clear example of the peak-locking error that was described in the introduction. Its also greatly enhanced by the particular structure of the target, which may have its borders aligned with the camera sensors. As was discussed in [22], squared figures are far from optimum targets for object tracking with subpixel accuracy. In Figure 8, it is unexpected to observe that the DSM curve deviates from a straight line, despite the movement being rectilinear and at a constant speed. As mentioned in Section 2.1, the DSM parameters are typically directly proportional to the displacement, especially for small movements. Considering that the total movement in this case is only 4 pixels, the deviation from a straight line implies that the shifted image from one frame to the next may not accurately replicate the original object, indicating the presence of distortions. It is important to note that the correlation-based method is not affected by these distortions. While the correlation function itself may be impacted by distortions, the tracking task only relies on the peak location, leading to the loss of this information in the final result. This result may seem contradictory to Figure 4 and Table 1, where it was shown that the dispersion of the mole figure was not very high and was certainly lower than that of the Gaussian target. It's important to note that those figures represented interframe variability, whereas the results in Figure 8 are the result of cumulative errors over time.