39 const T& lossC = T(1));
50 const T& lossC = T(1));
63 const T& lossC = T(1));
74 Ref<Eigen::VectorX<T>> gradient)
final;
80 Ref<Eigen::MatrixX<T>> jacobian,
81 Ref<Eigen::VectorX<T>> residual,
91 static constexpr
float kLimitWeight = 1e+1;
102 [[nodiscard]]
double getErrorImpl(
107 [[nodiscard]]
double getGradientImpl(
113 double getJacobianImpl(
118 int& usedRows) const;
Implementation of "A General and Adaptive Robust Loss Function" (https://arxiv.org/abs/1701....
static constexpr T kL2
Special-case alpha values that are either at a singularity in the general formula or simplify to a cl...
double getJacobian(const ModelParametersT< T > ¶ms, const SkeletonStateT< T > &state, const MeshStateT< T > &meshState, Ref< Eigen::MatrixX< T > > jacobian, Ref< Eigen::VectorX< T > > residual, int &usedRows) final
LimitErrorFunctionT(const Character &character, const ParameterLimits &pl, const T &lossAlpha=GeneralizedLossT< T >::kL2, const T &lossC=T(1))
A convenience constructor where character supplies the skeleton and parameter transform,...
void setLimits(const ParameterLimits &lm)
LimitErrorFunctionT(const Character &character, const T &lossAlpha=GeneralizedLossT< T >::kL2, const T &lossC=T(1))
A convenience constructor where character contains info of the skeleton, parameter transform,...
LimitErrorFunctionT(const Skeleton &skel, const ParameterTransform &pt, const ParameterLimits &pl=ParameterLimits(), const T &lossAlpha=GeneralizedLossT< T >::kL2, const T &lossC=T(1))
Constructor.
double getGradient(const ModelParametersT< T > ¶ms, const SkeletonStateT< T > &state, const MeshStateT< T > &meshState, Ref< Eigen::VectorX< T > > gradient) final
double getError(const ModelParametersT< T > ¶ms, const SkeletonStateT< T > &state, const MeshStateT< T > &meshState) final
size_t getJacobianSize() const final
SkeletonErrorFunctionT(const Skeleton &skel, const ParameterTransform &pt)
SkeletonT< float > Skeleton
std::vector< ParameterLimit > ParameterLimits
ParameterTransformT< float > ParameterTransform
Eigen::Matrix< T, Dynamic, Dynamic > MatrixX
Dynamic-size, column-major dense matrix.
Vector< T, Dynamic > VectorX
Dynamic-size column vector. Common return type for solver residuals and parameter vectors.
A character model with skeletal structure, mesh, and optional components.
Represents the complete state of a model's mesh.
A vector of size numModelParams holding the values of all model parameters for a character.
Represents the complete state of a skeleton.