You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To find good weights, ceres::ResidualBlockId can be used to store the IDs to each added residual blocks. Then, one can use ceres::Problem::EvaluateOptions and ceres::Problem::Evaluate(...) to retrieve the values of each individual term. We don't do that in the example for simplicity reasons. But we should perhaps still provide adequate example weights.
The text was updated successfully, but these errors were encountered:
This means no more messing around with GLM_FORCE_UNRESTRICTED_GENTYPE. Eigen and Ceres work much nicer together.
Updated the cost functions in ceres_nonlinear.hpp, and the example fit-model.ceres:
* Renamed LandmarkCost to PerspectiveProjectionLandmarkCost
* Renamed ImageCost to VertexColorCost
* Removed the use_perspective switch - only perspective projection now.
* Passing the rotation, translation and intrinsics now as separate function/template parameters
* VertexColorCost now uses eos::core::Image instead of cv::Mat
* Added Create factory functions to the cost functions to make it easier for user code to create them (following the Ceres tutorial)
* Number of shape, blendshape and colour coefficients can now be set, though they have to be set at compile time. We could make them runtime choosable but then we'd need to use Ceres' dynamic cost functions.
* get_shape_at_point() and get_vertex_color_at_point() are now much simpler with Eigen
* Added project() and perspective() functions, equivalent to the ones in GLM
* Added eos/core/math.hpp, with functions to convert between degrees and radians (inspired by GLM)
I have not measured the performance difference between the GLM and Eigen implementations, but running the fitting now is quite fast (a few seconds with VertexColorCost). I wouldn't be surprised if it became faster.
Two notes about fit-model-ceres:
* The weights for the cost functions are not really tuned, see #348
* The contour fitting is commented out at the moment, see #349
To find good weights,
ceres::ResidualBlockId
can be used to store the IDs to each added residual blocks. Then, one can useceres::Problem::EvaluateOptions
andceres::Problem::Evaluate(...)
to retrieve the values of each individual term. We don't do that in the example for simplicity reasons. But we should perhaps still provide adequate example weights.The text was updated successfully, but these errors were encountered: