-
-
Notifications
You must be signed in to change notification settings - Fork 596
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Re-add contour fitting to fit-model-ceres #349
Labels
Comments
patrikhuber
added a commit
that referenced
this issue
Feb 18, 2023
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
Ceres added
But it's probably better to use Eigen's Euler angles functionality everywhere. |
Done in b74f499, and released in v.1.4.0. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The contour fitting is commented out at the moment in fit-model-ceres. It needs extracting the yaw angle from the rotation quaternion, which Eigen currently doesn't have a function for. It could be re-added easily, we just need a reliable way to convert from the estimated rotation quaternion to a yaw angle.
The text was updated successfully, but these errors were encountered: