# A Fully-Automatic Gap Filling Approach for Motion Capture Trajectories
## 2 Related Work  
Recovering missing marker trajectories has been a recurring problem in the literature. Commercial software provides some solutions, yet in some cases they are insufficient. Gap filling methods found in literature can be broadly classified into (i) interpolation-based, (ii) skeleton-based, (iii) matrix-based, (iv) data-driven and (v) dynamical systems. Interpolation methods are quite popular because they are fast and easy to implement. They predict missing trajectories using the information surrounding gap duration; the endpoints of the gap may be connected linearly or by using higher order polynomials, such as splines, to enhance curve fitting [8]. These methods assume the continuity of the trajectory without incorporating any information about skeleton or kinematic constraints. For this reason, they are ineffective for longer gaps (typically above 500 ms) [8]. Spline interpolation is available in Vicon Nexus, which is a data capture and processing software for clinical gait and biomechanics provided by Vicon [16]. Skeleton-based approaches, namely the pattern fill and the rigid body fill, are also available in Vicon Nexus [16]. These methods are grounded on the idea that some markers' trajectories may be highly related due to bone length and motion range constraints. The pattern fill method uses a trajectory without gaps (the donor trajectory) to fill the selected gap, whereas the rigid body fill uses at least three donor trajectories that are assumed to be all part of the same rigid body [5; 16]. A full description of these methods can be found in [5] and [17]. Skeleton-based methods require prior knowledge about skeleton constraints and are highly dependent on how accurately these constraints can be represented. As the human body presents some degree of flexibility, rigid body assumptions are not always true [9]. These methods may also fail when there is a large proportion of markers belonging to the same rigid body missing. Several works approached this problem by incorporating information about movement dynamics. Using dynamical systems, e.g., Kalman filters, it is possible to estimate the next position of a marker based on its past positions and, simultaneously, preserve constraints imposed by neighbouring markers belonging to the same rigid body [12; 13]. Kalman filters can be used in real-time, but they are vulnerable with respect to missing neighbours and longer gaps where the assumption of keeping the moving trend may not hold true [12; 13; 18]. These filters are also difficult to implement in practice: designing the filter to match data characteristics or correcting gaps that start from the beginning can be challenging tasks. As an alternative, data may be modelled using data-driven approaches. Examples based on Principal Component Analysis (PCA) [10] or probabilistic model averaging [7] can be found in literature. More recently, methods based on deep neural networks and, more specifically, recurrent neural networks (e.g., [6; 11; 19]) have been proposed to model human motion sequences and recover missing markers' trajectories. Although these methods achieve very good performance in general, they require training with a large and representative set of motions--using the same marker placement and similar movements--so that learned models can generalize well with respect to new data. However, obtaining clean and large datasets for training can be a challenge. With matrix-based methods, models may be trained by using the motion sequence itself so that no additional data are required. These methods rely on the premise that human motion often exhibits low-dimensional local linearity; thus, they will represent the entire motion sequence as a matrix, they will learn linear relations between markers' trajectories and they will use these relations to reconstruct gaps in the matrix. Matrix transformation techniques, such as PCA [14; 20], singular value thresholding (SVT) [21] or non-negative matrix factorization (NMF) [22] have been employed.