[][src]Function opencv::face::load_face_points

pub fn load_face_points(
    filename: &str,
    points: &mut dyn ToOutputArray,
    offset: f32
) -> Result<bool>

A utility to load facial landmark information from a given file.

Parameters

  • filename: The filename of file contains the facial landmarks data.
  • points: The loaded facial landmark points.
  • offset: An offset value to adjust the loaded points.

Example of usage

This example is not tested
std::vector<Point2f> points;
face::loadFacePoints("filename.txt", points, 0.0f);

The annotation file should follow the default format which is

This example is not tested
version: 1
n_points:  68
{
212.716603 499.771793
230.232816 566.290071
...
}

where n_points is the number of points considered and each point is represented as its position in x and y.

C++ default parameters

  • offset: 0.0f