# A Fully-Automatic Gap Filling Approach for Motion Capture Trajectories
## 6 Discussion
### Comparison with Vicon Nexus' Methods  
In the experiments involving the reconstruction of gaps in the middle and in comparison with Vicon Nexus' methods, our method achieved better and more consistent performance (Table 4), presenting lower reconstruction errors in all tested conditions, i.e., activity types (Table 5), gap lengths (Figure 5A) and number of missing markers (Figure 5B). Our method presented the lowest dispersion values, maintaining its consistency (in terms of central tendency and dispersion) irrespective of the size of the gaps (Figure 5A), activity type (Table 5) and number of missing markers (Figure 5B). As expected, the spline fill method reveals acceptable performance for shorter gaps, but errors increase to the order of the meters as the size of the gap increases (Table 6). The errors on spline are theoretically independent of the number of missing markers, because it reconstructs the missing parts using only the trajectory of the missing marker. This observation can be confirmed by analysing Table 6. In Table 5, a notable difference between the reconstruction performance in boxing and reaching activities compared to walking and dancing can be observed. These results highlight another important characteristic of the spline fill method: When activities involve larger displacements in space (as is the case of walking and dancing), the reconstructions can approximate the larger displacements, ignoring the more granular movements occurring in between; when activities require less displacement in space (as is the case of boxing and reaching activities), interpolation will have more difficulties in reconstructing the performed trajectories, as most likely the information surrounding the gaps--used for the reconstruction--contain no valuable information concerning the behaviour of the markers in between. For this reason, the type of movement should also be considered a criteria in the selection of the method to use. Contrarily to the spline fill method, the errors obtained with the pattern fill method increase as the number of missing markers increases (Figure 5B). The pattern fill method requires another marker that serves as a template (the donor trajectory) to fill in the missing data. In our experiments, the pattern fill method was not always able to reconstruct the missing trajectories, possibly due to the fact that the best template included invalid frames within the gap region [17], which happened more frequently when the number of missing markers was higher. When this happened, we chose to penalize the method by considering a maximum error value, which may justify the results. The rigid body fill method resulted in errors that increased mostly with gap length (Figure 5A), but remained more or less constant with the increase in the number of missing markers (Figure 5B). The rigid body fill was able to reconstruct all missing parts; however, considering that the error increased with the length of the gaps, we can assume that it was \begin{table}
\begin{tabular}{c c c c c c c c c c} \hline \hline \(I\) & \(n=1\) & \(n=2\) & \(n=4\) & \(n=6\) & \(n=8\) & \(n=10\) & \(n=12\) & \(n=14\) & **Average** \\ \hline
60 & 2.3 (1.9) & 3.0 (3.4) & 3.2 (1.8) & 3.6 (1.9) & 3.0 (1.1) & 3.5 (1.5) & 3.7 (1.4) & 4.8 (1.8) & 3.4 (2.1) \\
120 & 2.8 (2.1) & 2.5 (1.8) & 2.6 (1.0) & 2.8 (1.3) & 3.7 (2.8) & 3.3 (1.7) & 3.4 (1.4) & 4.6 (3.1) & 3.2 (2.1) \\
240 & 2.5 (1.5) & 4.0 (3.7) & 4.5 (1.6) & 4.8 (2.3) & 4.7 (2.5) & 6.0 (3.4) & 4.9 (2.3) & 5.6 (2.0) & 4.6 (2.7) \\
600 & 4.9 (3.9) & 3.9 (2.0) & 5.3 (3.9) & 4.6 (2.6) & 5.2 (3.7) & 6.0 (2.4) & 7.1 (4.7) & 5.9 (3.0) & 5.3 (3.5) \\ Average & 3.1 (2.7) & 3.3 (2.9) & 3.9 (2.6) & 3.9 (2.2) & 4.2 (2.8) & 4.7 (2.7) & 4.8 (3.2) & 5.2 (2.6) & 4.1 (2.8) \\ \hline \hline \end{tabular}
\end{table} 
Table 7: Performance of our algorithm when reconstructing samples with gaps located in the initial or final frames of the trajectories. Means (standard deviation) of RMSE are presented, in cm, per tested condition.