Momentum
A library for solving nonlinear optimization problems related to human body kinematics
Loading...
Searching...
No Matches
process_markers.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
13
14#include <string>
15
16namespace momentum {
17
38 momentum::Character& character,
40 std::span<const std::vector<momentum::Marker>> markerData,
41 const CalibrationConfig& calibrationConfig,
42 size_t firstFrame = 0,
43 size_t maxFrames = 0,
44 std::span<const GloveFrameData> leftGloveData = {},
45 std::span<const GloveFrameData> rightGloveData = {},
46 const std::optional<GloveConfig>& gloveConfig = std::nullopt,
47 std::span<const CameraKeypointData> cameraKeypointData = {},
48 std::vector<size_t>* selectedFrameIndices = nullptr,
49 Eigen::MatrixXf* selectedFrameMotion = nullptr);
50
69Eigen::MatrixXf processMarkers(
70 momentum::Character& character,
72 const std::vector<std::vector<momentum::Marker>>& markerData,
73 const TrackingConfig& trackingConfig,
74 const CalibrationConfig& calibrationConfig,
75 bool calibrate = true,
76 size_t firstFrame = 0,
77 size_t maxFrames = 0,
78 std::span<const GloveFrameData> leftGloveData = {},
79 std::span<const GloveFrameData> rightGloveData = {},
80 const std::optional<GloveConfig>& gloveConfig = std::nullopt,
81 std::span<const CameraKeypointData> cameraKeypointData = {});
82
86 const std::string& inputMarkerFile,
87 const std::string& outputFile,
88 const TrackingConfig& trackingConfig,
89 const CalibrationConfig& calibrationConfig,
90 const ModelOptions& modelOptions,
91 bool calibrate,
92 size_t firstFrame = 0,
93 size_t maxFrames = 0);
94
95} // namespace momentum
void processMarkerFile(const std::string &inputMarkerFile, const std::string &outputFile, const TrackingConfig &trackingConfig, const CalibrationConfig &calibrationConfig, const ModelOptions &modelOptions, bool calibrate, size_t firstFrame, size_t maxFrames)
Runs marker tracking on an input marker file (e.g.
void calibrateMarkers(momentum::Character &character, momentum::ModelParameters &identity, std::span< const std::vector< momentum::Marker > > markerData, const CalibrationConfig &calibrationConfig, size_t firstFrame, size_t maxFrames, std::span< const GloveFrameData > leftGloveData, std::span< const GloveFrameData > rightGloveData, const std::optional< GloveConfig > &gloveConfig, std::span< const CameraKeypointData > cameraKeypointData, std::vector< size_t > *selectedFrameIndices, Eigen::MatrixXf *selectedFrameMotion)
Calibrates a character model using marker data without running full tracking.
Eigen::MatrixXf processMarkers(momentum::Character &character, momentum::ModelParameters &identity, const std::vector< std::vector< momentum::Marker > > &markerData, const TrackingConfig &trackingConfig, const CalibrationConfig &calibrationConfig, bool calibrate, size_t firstFrame, size_t maxFrames, std::span< const GloveFrameData > leftGloveData, std::span< const GloveFrameData > rightGloveData, const std::optional< GloveConfig > &gloveConfig, std::span< const CameraKeypointData > cameraKeypointData)
Processes marker data for a character model.
ModelParametersT< float > ModelParameters
Definition types.h:105
Configuration for running body and/or locator calibration.
Configuration for pose tracking given a calibrated body and locators.