|
Momentum
A library for solving nonlinear optimization problems related to human body kinematics
|
#include <pose_prior_error_function.h>
Public Member Functions | |
| PosePriorErrorFunctionT (const Skeleton &skel, const ParameterTransform &pt, std::shared_ptr< const MppcaT< T > > pp) | |
| PosePriorErrorFunctionT (const Character &character, std::shared_ptr< const MppcaT< T > > pp) | |
| void | setPosePrior (std::shared_ptr< const MppcaT< T > > pp) |
| double | getError (const ModelParametersT< T > ¶ms, const SkeletonStateT< T > &state, const MeshStateT< T > &meshState) final |
| double | getGradient (const ModelParametersT< T > ¶ms, const SkeletonStateT< T > &state, const MeshStateT< T > &meshState, Eigen::Ref< Eigen::VectorX< T > > gradient) final |
| double | logProbability (const ModelParametersT< T > ¶ms) const |
| double | getJacobian (const ModelParametersT< T > ¶ms, const SkeletonStateT< T > &state, const MeshStateT< T > &meshState, Eigen::Ref< Eigen::MatrixX< T > > jacobian, Eigen::Ref< Eigen::VectorX< T > > residual, int &usedRows) final |
| size_t | getJacobianSize () const final |
| Eigen::VectorX< T > | getMeanShape (const ModelParametersT< T > ¶ms) const |
| Public Member Functions inherited from momentum::SkeletonErrorFunctionT< T > | |
| SkeletonErrorFunctionT (const Skeleton &skel, const ParameterTransform &pt) | |
| virtual | ~SkeletonErrorFunctionT ()=default |
| const Skeleton & | getSkeleton () const |
| const ParameterTransform & | getParameterTransform () const |
| virtual const Character * | getCharacter () const |
| For mesh-based error functions, get access to the underlying character. | |
| void | setWeight (T w) |
| T | getWeight () const |
| void | setActiveJoints (const VectorX< bool > &aj) |
| void | setEnabledParameters (const ParameterSet &ps) |
| virtual void | getHessian (const ModelParametersT< T > &, const SkeletonStateT< T > &, const MeshStateT< T > &, Eigen::Ref< Eigen::MatrixX< T > >) |
| virtual double | getSolverDerivatives (const ModelParametersT< T > ¶meters, const SkeletonStateT< T > &state, const MeshStateT< T > &meshState, const size_t actualParameters, Eigen::MatrixX< T > &hess, Eigen::VectorX< T > &grad) |
| virtual bool | needsMesh () const |
Protected Member Functions | |
| void | loadInternal () |
| void | getBestFitMode (const ModelParametersT< T > ¶ms, size_t &bestIdx, Eigen::VectorX< T > &bestDiff, T &bestR, T &minDist) const |
Protected Attributes | |
| std::vector< size_t > | ppMap_ |
| std::vector< size_t > | invMap_ |
| std::shared_ptr< const MppcaT< T > > | posePrior_ |
| Protected Attributes inherited from momentum::SkeletonErrorFunctionT< T > | |
| const Skeleton & | skeleton_ |
| const ParameterTransform & | parameterTransform_ |
| T | weight_ |
| VectorX< bool > | activeJointParams_ |
| ParameterSet | enabledParameters_ |
| bool | useHessian_ {false} |
Static Protected Attributes | |
| static constexpr T | kPosePriorWeight = 1e-3 |
Definition at line 19 of file pose_prior_error_function.h.
| momentum::PosePriorErrorFunctionT< T >::PosePriorErrorFunctionT | ( | const Skeleton & | skel, |
| const ParameterTransform & | pt, | ||
| std::shared_ptr< const MppcaT< T > > | pp ) |
Definition at line 17 of file pose_prior_error_function.cpp.
References loadInternal(), posePrior_, and momentum::SkeletonErrorFunctionT< T >::SkeletonErrorFunctionT().
Referenced by momentum::FullyDifferentiablePosePriorErrorFunctionT< T >::FullyDifferentiablePosePriorErrorFunctionT(), and PosePriorErrorFunctionT().
| momentum::PosePriorErrorFunctionT< T >::PosePriorErrorFunctionT | ( | const Character & | character, |
| std::shared_ptr< const MppcaT< T > > | pp ) |
Definition at line 28 of file pose_prior_error_function.cpp.
References PosePriorErrorFunctionT().
|
protected |
Definition at line 218 of file pose_prior_error_function.cpp.
References momentum::kInvalidIndex, momentum::mapParameters(), posePrior_, and ppMap_.
Referenced by momentum::FullyDifferentiablePosePriorErrorFunctionT< T >::d_gradient_d_input_dot(), getGradient(), getJacobian(), getMeanShape(), and logProbability().
|
nodiscardfinalvirtual |
Reimplemented from momentum::SkeletonErrorFunctionT< T >.
Definition at line 86 of file pose_prior_error_function.cpp.
References kPosePriorWeight, logProbability(), and momentum::SkeletonErrorFunctionT< T >::weight_.
|
finalvirtual |
Reimplemented from momentum::SkeletonErrorFunctionT< T >.
Definition at line 95 of file pose_prior_error_function.cpp.
References getBestFitMode(), invMap_, momentum::kInvalidIndex, kPosePriorWeight, MT_PROFILE_FUNCTION, posePrior_, ppMap_, momentum::EigenStrongType< Derived, EigenType >::size(), and momentum::SkeletonErrorFunctionT< T >::weight_.
|
finalvirtual |
Reimplemented from momentum::SkeletonErrorFunctionT< T >.
Definition at line 147 of file pose_prior_error_function.cpp.
References getBestFitMode(), invMap_, momentum::kInvalidIndex, kPosePriorWeight, MT_PROFILE_FUNCTION, posePrior_, momentum::EigenStrongType< Derived, EigenType >::size(), and momentum::SkeletonErrorFunctionT< T >::weight_.
|
nodiscardfinalvirtual |
Reimplemented from momentum::SkeletonErrorFunctionT< T >.
Definition at line 138 of file pose_prior_error_function.cpp.
References posePrior_.
|
nodiscard |
Definition at line 204 of file pose_prior_error_function.cpp.
References getBestFitMode(), invMap_, momentum::kInvalidIndex, momentum::mapParameters(), momentum::SkeletonErrorFunctionT< T >::parameterTransform_, and posePrior_.
|
protected |
Definition at line 41 of file pose_prior_error_function.cpp.
References invMap_, momentum::kInvalidIndex, momentum::SkeletonErrorFunctionT< T >::parameterTransform_, posePrior_, and ppMap_.
Referenced by PosePriorErrorFunctionT(), and setPosePrior().
|
nodiscard |
Definition at line 68 of file pose_prior_error_function.cpp.
References getBestFitMode(), invMap_, and momentum::EigenStrongType< Derived, EigenType >::size().
Referenced by getError().
| void momentum::PosePriorErrorFunctionT< T >::setPosePrior | ( | std::shared_ptr< const MppcaT< T > > | pp | ) |
Definition at line 34 of file pose_prior_error_function.cpp.
References loadInternal(), and posePrior_.
Referenced by momentum::FullyDifferentiablePosePriorErrorFunctionT< T >::setInputImp(), and momentum::FullyDifferentiablePosePriorErrorFunctionT< T >::setPosePrior().
|
protected |
Definition at line 64 of file pose_prior_error_function.h.
Referenced by getGradient(), getJacobian(), getMeanShape(), loadInternal(), and logProbability().
|
staticconstexprprotected |
Definition at line 73 of file pose_prior_error_function.h.
Referenced by momentum::FullyDifferentiablePosePriorErrorFunctionT< T >::d_gradient_d_input_dot(), getError(), getGradient(), and getJacobian().
|
protected |
Definition at line 70 of file pose_prior_error_function.h.
Referenced by momentum::FullyDifferentiablePosePriorErrorFunctionT< T >::d_gradient_d_input_dot(), getBestFitMode(), getGradient(), momentum::FullyDifferentiablePosePriorErrorFunctionT< T >::getInputImp(), getJacobian(), getJacobianSize(), getMeanShape(), loadInternal(), PosePriorErrorFunctionT(), momentum::FullyDifferentiablePosePriorErrorFunctionT< T >::setInputImp(), and setPosePrior().
|
protected |
Definition at line 63 of file pose_prior_error_function.h.
Referenced by momentum::FullyDifferentiablePosePriorErrorFunctionT< T >::d_gradient_d_input_dot(), getBestFitMode(), getGradient(), and loadInternal().