Momentum
A library for solving nonlinear optimization problems related to human body kinematics
Loading...
Searching...
No Matches
marker_gap_fill.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7
8#pragma once
9
11
12#include <vector>
13
14namespace momentum {
15
20 bool enabled = false;
21
26 size_t maxGapFrames = 30;
27
35
39 double maxGapDisplacement = 5.0;
40
45 size_t minVisibleFrames = 60;
46
49 size_t blendOffFrames = 10;
50
54};
55
75 std::vector<std::vector<Marker>>& markerData,
76 const GapFillConfig& config = {});
77
78} // namespace momentum
void preprocessMarkerGaps(std::vector< std::vector< Marker > > &markerData, const GapFillConfig &config)
Pre-process marker data to fill temporary gaps and blend off permanent dropouts.
Configuration for marker gap filling and blend-off.
double maxGapDisplacement
Displacement threshold (cm) above which the standard maxGapFrames applies.
size_t maxGapFrames
Maximum gap length (in frames) to interpolate using cubic Hermite.
size_t minVisibleFrames
Minimum number of visible frames for a segment to be considered reliable.
size_t blendOffFrames
Number of frames over which to blend off permanently dropped markers.
bool enabled
Master switch.
size_t velocityWindowFrames
Number of visible frames to use for velocity estimation when extrapolating permanent dropouts.
size_t maxGapFramesStationary
Extended maximum gap length (in frames) for near-stationary markers.