OpenCV453
公開メンバ関数 | 全メンバ一覧
cv::face::Facemark クラスabstract

Abstract base class for all facemark models [詳解]

#include <facemark.hpp>

cv::Algorithmを継承しています。

cv::face::FacemarkKazemi, cv::face::FacemarkTrainに継承されています。

公開メンバ関数

virtual CV_WRAP void loadModel (String model)=0
 A function to load the trained model before the fitting process. [詳解]
 
virtual CV_WRAP bool fit (InputArray image, InputArray faces, OutputArrayOfArrays landmarks)=0
 Detect facial landmarks from an image. [詳解]
 
- 基底クラス cv::Algorithm に属する継承公開メンバ関数
virtual CV_WRAP void clear ()
 Clears the algorithm state [詳解]
 
virtual void write (FileStorage &fs) const
 Stores algorithm parameters in a file storage [詳解]
 
CV_WRAP void write (const Ptr< FileStorage > &fs, const String &name=String()) const
 simplified API for language bindings これはオーバーロードされたメンバ関数です。利便性のために用意されています。元の関数との違いは引き数のみです。
 
virtual CV_WRAP void read (const FileNode &fn)
 Reads algorithm parameters from a file storage [詳解]
 
virtual CV_WRAP bool empty () const
 Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read [詳解]
 
virtual CV_WRAP void save (const String &filename) const
 
virtual CV_WRAP String getDefaultName () const
 

その他の継承メンバ

- 基底クラス cv::Algorithm に属する継承静的公開メンバ関数
template<typename _Tp >
static Ptr< _Tp > read (const FileNode &fn)
 Reads algorithm from the file node [詳解]
 
template<typename _Tp >
static Ptr< _Tp > load (const String &filename, const String &objname=String())
 Loads algorithm from the file [詳解]
 
template<typename _Tp >
static Ptr< _Tp > loadFromString (const String &strModel, const String &objname=String())
 Loads algorithm from a String [詳解]
 
- 基底クラス cv::Algorithm に属する継承限定公開メンバ関数
void writeFormat (FileStorage &fs) const
 

詳解

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:

// Using Facemark in your code:
Ptr<Facemark> facemark = createFacemarkLBF();

The typical pipeline for facemark detection is as follows:

関数詳解

◆ fit()

virtual CV_WRAP bool cv::face::Facemark::fit ( InputArray  image,
InputArray  faces,
OutputArrayOfArrays  landmarks 
)
pure virtual

Detect facial landmarks from an image.

引数
imageInput image.
facesOutput of the function which represent region of interest of the detected faces. Each face is stored in cv::Rect container.
landmarksThe detected landmark points for each faces.

Example of usage

Mat image = imread("image.jpg");
std::vector<Rect> faces;
std::vector<std::vector<Point2f> > landmarks;
facemark->fit(image, faces, landmarks);
CV_EXPORTS_W Mat imread(const String &filename, int flags=IMREAD_COLOR)
Loads an image from a file.

◆ loadModel()

virtual CV_WRAP void cv::face::Facemark::loadModel ( String  model)
pure virtual

A function to load the trained model before the fitting process.

引数
modelA string represent the filename of a trained model.

Example of usage

facemark->loadModel("../data/lbf.model");

このクラス詳解は次のファイルから抽出されました: