Class cv::face::Facemark#
Abstract base class for all facemark models. View details
#include <opencv2/face/facemark.hpp>Collaboration diagram for cv::face::Facemark:
Public Member Functions#
Public Member Functions inherited from cv::Algorithm
Return |
Name |
Description |
|---|---|---|
|
Clears the algorithm state. |
|
|
Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read. |
|
|
Reads algorithm parameters from a file storage. |
|
|
||
|
|
|
|
Stores algorithm parameters in a file storage. |
|
|
Static Public Member Functions#
Static Public Member Functions inherited from cv::Algorithm
Return |
Name |
Description |
|---|---|---|
|
|
Loads algorithm from the file. |
|
|
Loads algorithm from a String. |
|
Reads algorithm from the file node. |
Additional Inherited Members#
Protected Member Functions inherited from cv::Algorithm
Return |
Name |
Description |
|---|---|---|
|
Detailed Description#
-
class Facemark : public virtual cv::Algorithm#
Abstract base class for all facemark models.
To utilize this API in your program, please take a look at the tutorial_table_of_content_facemark
Description#
Facemark is a base class which provides universal access to any specific facemark algorithm. Therefore, the users should declare a desired algorithm before they can use it in their application.
Here is an example on how to declare a facemark algorithm:
The typical pipeline for facemark detection is as follows:
Load the trained model using Facemark::loadModel.
Perform the fitting on an image via Facemark::fit.
Subclassed by cv::face::FacemarkKazemi, cv::face::FacemarkTrain
Member Function Documentation#
fit()#
bool cv::face::Facemark::fit(
InputArray image,
InputArray faces,
OutputArrayOfArrays landmarks )
Detect facial landmarks from an image.
Example of usage
Parameters
image— Input image.faces— Output of the function which represent region of interest of the detected faces. Each face is stored in cv::Rect container.landmarks— The detected landmark points for each faces.
loadModel()#
void cv::face::Facemark::loadModel(String model)
A function to load the trained model before the fitting process.
Example of usage
facemark->loadModel("../data/lbf.model");
Parameters
model— A string represent the filename of a trained model.
Source file#
The documentation for this class was generated from the following file:
opencv2/face/facemark.hpp