OpenCV 5.0.0-pre
Open Source Computer Vision
Loading...
Searching...
No Matches
cv::face::FacemarkKazemi Class Referenceabstract

#include <opencv2/face/face_alignment.hpp>

Collaboration diagram for cv::face::FacemarkKazemi:

Classes

struct  Params
 

Public Member Functions

virtual ~FacemarkKazemi ()
 
virtual bool getFaces (InputArray image, OutputArray faces)=0
 get faces using the custom detector
 
virtual bool setFaceDetector (bool(*f)(InputArray, OutputArray, void *), void *userData)=0
 set the custom face detector
 
virtual bool training (std::vector< Mat > &images, std::vector< std::vector< Point2f > > &landmarks, std::string configfile, Size scale, std::string modelFilename="face_landmarks.dat")=0
 This function is used to train the model using gradient boosting to get a cascade of regressors which can then be used to predict shape.
 
- Public Member Functions inherited from cv::face::Facemark
virtual bool fit (InputArray image, InputArray faces, OutputArrayOfArrays landmarks)=0
 Detect facial landmarks from an image.
 
virtual void loadModel (String model)=0
 A function to load the trained model before the fitting process.
 
- Public Member Functions inherited from cv::Algorithm
 Algorithm ()
 
virtual ~Algorithm ()
 
virtual void clear ()
 Clears the algorithm state.
 
virtual bool empty () const
 Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read.
 
virtual String getDefaultName () const
 
virtual void read (const FileNode &fn)
 Reads algorithm parameters from a file storage.
 
virtual void save (const String &filename) const
 
virtual void write (FileStorage &fs) const
 Stores algorithm parameters in a file storage.
 
void write (FileStorage &fs, const String &name) const
 

Static Public Member Functions

static Ptr< FacemarkKazemicreate (const FacemarkKazemi::Params &parameters=FacemarkKazemi::Params())
 
- Static Public Member Functions inherited from cv::Algorithm
template<typename _Tp >
static Ptr< _Tpload (const String &filename, const String &objname=String())
 Loads algorithm from the file.
 
template<typename _Tp >
static Ptr< _TploadFromString (const String &strModel, const String &objname=String())
 Loads algorithm from a String.
 
template<typename _Tp >
static Ptr< _Tpread (const FileNode &fn)
 Reads algorithm from the file node.
 

Additional Inherited Members

- Protected Member Functions inherited from cv::Algorithm
void writeFormat (FileStorage &fs) const
 

Constructor & Destructor Documentation

◆ ~FacemarkKazemi()

virtual cv::face::FacemarkKazemi::~FacemarkKazemi ( )
virtual

Member Function Documentation

◆ create()

static Ptr< FacemarkKazemi > cv::face::FacemarkKazemi::create ( const FacemarkKazemi::Params & parameters = FacemarkKazemi::Params())
static

◆ getFaces()

virtual bool cv::face::FacemarkKazemi::getFaces ( InputArray image,
OutputArray faces )
pure virtual

get faces using the custom detector

◆ setFaceDetector()

virtual bool cv::face::FacemarkKazemi::setFaceDetector ( bool(* )(InputArray, OutputArray, void *),
void * userData )
pure virtual

set the custom face detector

◆ training()

virtual bool cv::face::FacemarkKazemi::training ( std::vector< Mat > & images,
std::vector< std::vector< Point2f > > & landmarks,
std::string configfile,
Size scale,
std::string modelFilename = "face_landmarks.dat" )
pure virtual

This function is used to train the model using gradient boosting to get a cascade of regressors which can then be used to predict shape.

Parameters
imagesA vector of type cv::Mat which stores the images which are used in training samples.
landmarksA vector of vectors of type cv::Point2f which stores the landmarks detected in a particular image.
scaleA size of type cv::Size to which all images and landmarks have to be scaled to.
configfileA variable of type std::string which stores the name of the file storing parameters for training the model.
modelFilenameA variable of type std::string which stores the name of the trained model file that has to be saved.
Returns
A boolean value. The function returns true if the model is trained properly or false if it is not trained.

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