eos 1.4.0
Loading...
Searching...
No Matches
Static Public Member Functions | Public Attributes | List of all members
eos::fitting::ContourLandmarks Struct Reference

Defines which 2D landmarks comprise the right and left face contour. More...

#include <contour_correspondence.hpp>

Static Public Member Functions

static ContourLandmarks load (std::string filename)
 

Public Attributes

std::vector< std::string > right_contour
 
std::vector< std::string > left_contour
 

Detailed Description

Defines which 2D landmarks comprise the right and left face contour.

This class holds 2D image contour landmark information. More specifically, it defines which 2D landmark IDs correspond to the right contour and which to the left. These definitions are loaded from a file, for example from the "contour_landmarks" part of share/ibug_to_sfm.txt.

Todo: We should improve error handling here. When there's no contour_landmarks in the file, it will crash, but it would be nice if it still worked, the returned vectors should just be empty.

Note: Better names could be ContourDefinition or ImageContourLandmarks, to disambiguate 3D and 2D landmarks? Todo: I think this should go into the LandmarkMapper. Isn't it part of ibug_to_sfm.txt already?

Member Function Documentation

◆ load()

static ContourLandmarks eos::fitting::ContourLandmarks::load ( std::string  filename)
inlinestatic

Helper method to load contour landmarks from a text file with landmark mappings, like ibug_to_sfm.txt.

Parameters
[in]filenameFilename to a landmark-mapping file.
Returns
A ContourLandmarks instance with loaded 2D contour landmarks.
Exceptions
std::runtime_errorruntime_error or toml::exception if there is an error loading the landmarks from the file.

The documentation for this struct was generated from the following file: