Skip to content
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

Document different behaviours of landmark mappings file better #296

Open
patrikhuber opened this issue Feb 18, 2020 · 0 comments
Open

Document different behaviours of landmark mappings file better #296

patrikhuber opened this issue Feb 18, 2020 · 0 comments

Comments

@patrikhuber
Copy link
Owner

See this code section here:

// If the MorphableModel does not contain landmark definitions, we expect the user to have given us
// direct mappings (e.g. directly from ibug identifiers to vertex ids). If the model does contain
// landmark definitions, we expect the user to use mappings from their landmark identifiers (e.g.
// ibug) to the landmark definitions, and not to vertex indices.
// Todo: This might be worth mentioning in the function documentation of fit_shape_and_pose.
int vertex_idx;
if (morphable_model.get_landmark_definitions())
{
const auto found_vertex_idx =
morphable_model.get_landmark_definitions().value().find(converted_name.value());
if (found_vertex_idx != std::end(morphable_model.get_landmark_definitions().value()))
{
vertex_idx = found_vertex_idx->second;
} else
{
continue;
}
} else
{
vertex_idx = std::stoi(converted_name.value());
}

I am not sure whether this is documented somewhere, I'd have to check. If it isn't already, would be worth documenting this more prominently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant