Nirkin Face Swap  0.9.0
Face swap.
face_swap::Basel3DMM Struct Reference

Represents Basel's 3D Morphable Model. More...

#include <basel_3dmm.h>

Public Member Functions

Mesh sample (const cv::Mat &shape_coefficients, const cv::Mat &tex_coefficients)
 Sample a mesh from the PCA model. More...
 
Mesh sample (const cv::Mat &shape_coefficients, const cv::Mat &tex_coefficients, const cv::Mat &expr_coefficients)
 Sample a mesh from the PCA model. More...
 

Static Public Member Functions

static Basel3DMM load (const std::string &model_file)
 Load a Basel's 3DMM from file. More...
 

Public Attributes

cv::Mat faces
 
cv::Mat shapeMU
 
cv::Mat shapePC
 
cv::Mat shapeEV
 
cv::Mat texMU
 
cv::Mat texPC
 
cv::Mat texEV
 
cv::Mat exprMU
 
cv::Mat exprPC
 
cv::Mat exprEV
 

Detailed Description

Represents Basel's 3D Morphable Model.

This is a PCA model of 3D faces that includes shape, texture and expressions. Based on the paper: A 3D Face Model for Pose and Illumination Invariant Face Recognition, P. Paysan and R. Knothe and B. Amberg and S. Romdhani and T. Vetter.

Member Function Documentation

static Basel3DMM face_swap::Basel3DMM::load ( const std::string &  model_file)
static

Load a Basel's 3DMM from file.

Parameters
model_filePath to 3DMM file (.h5).
Mesh face_swap::Basel3DMM::sample ( const cv::Mat &  shape_coefficients,
const cv::Mat &  tex_coefficients 
)

Sample a mesh from the PCA model.

Parameters
[in]shape_coefficientsPCA shape coefficients.
[in]tex_coefficientsPCA texture coefficients.
Mesh face_swap::Basel3DMM::sample ( const cv::Mat &  shape_coefficients,
const cv::Mat &  tex_coefficients,
const cv::Mat &  expr_coefficients 
)

Sample a mesh from the PCA model.

Parameters
[in]shape_coefficientsPCA shape coefficients.
[in]tex_coefficientsPCA texture coefficients.
[in]expr_coefficientsPCA expression coefficients.

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