|
Nirkin Face Swap
0.9.0
Face swap.
|
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 |
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.
|
static |
Load a Basel's 3DMM from file.
| model_file | Path 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.
| [in] | shape_coefficients | PCA shape coefficients. |
| [in] | tex_coefficients | PCA 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.
| [in] | shape_coefficients | PCA shape coefficients. |
| [in] | tex_coefficients | PCA texture coefficients. |
| [in] | expr_coefficients | PCA expression coefficients. |