OpenCV 4.5.3(日本語機械翻訳)
全て クラス 名前空間 ファイル 関数 変数 型定義 列挙型 列挙値 フレンド グループ ページ
facemarkLBF.hpp
1 /*
2 By downloading, copying, installing or using the software you agree to this
3 license. If you do not agree to this license, do not download, install,
4 copy or use the software.
5 License Agreement
6 For Open Source Computer Vision Library
7 (3-clause BSD License)
8 Copyright (C) 2013, OpenCV Foundation, all rights reserved.
9 Third party copyrights are property of their respective owners.
10 Redistribution and use in source and binary forms, with or without modification,
11 are permitted provided that the following conditions are met:
12 * Redistributions of source code must retain the above copyright notice,
13 this list of conditions and the following disclaimer.
14 * Redistributions in binary form must reproduce the above copyright notice,
15 this list of conditions and the following disclaimer in the documentation
16 and/or other materials provided with the distribution.
17 * Neither the names of the copyright holders nor the names of the contributors
18 may be used to endorse or promote products derived from this software
19 without specific prior written permission.
20 This software is provided by the copyright holders and contributors "as is" and
21 any express or implied warranties, including, but not limited to, the implied
22 warranties of merchantability and fitness for a particular purpose are
23 disclaimed. In no event shall copyright holders or contributors be liable for
24 any direct, indirect, incidental, special, exemplary, or consequential damages
25 (including, but not limited to, procurement of substitute goods or services;
26 loss of use, data, or profits; or business interruption) however caused
27 and on any theory of liability, whether in contract, strict liability,
28 or tort (including negligence or otherwise) arising in any way out of
29 the use of this software, even if advised of the possibility of such damage.
30
31 This file was part of GSoC Project: Facemark API for OpenCV
32 Final report: https://gist.github.com/kurnianggoro/74de9121e122ad0bd825176751d47ecc
33 Student: Laksono Kurnianggoro
34 Mentor: Delia Passalacqua
35 */
36
37 #ifndef __OPENCV_FACEMARK_LBF_HPP__
38 #define __OPENCV_FACEMARK_LBF_HPP__
39
40 #include "opencv2/face/facemark_train.hpp"
41
42 namespace cv {
43 namespace face {
44
47
48 class CV_EXPORTS_W FacemarkLBF : public FacemarkTrain
49{
50 public:
51 struct CV_EXPORTS Params
52 {
57
62 bool verbose;
64
69
72 int tree_n;
78
79 std::string model_filename;
82 unsigned int seed;
83
84 std::vector<int> feats_m;
85 std::vector<double> radius_m;
86 std::vector<int> pupils[2];
88
89 Rect detectROI;
90
91 void read(const FileNode& /*fn*/);
92 void write(FileStorage& /*fs*/) const;
93
94 };
95
96 class BBox {
97 public:
98 BBox();
99 ~BBox();
100 BBox(double x, double y, double w, double h);
101
102 Mat project(const Mat &shape) const;
103 Mat reproject(const Mat &shape) const;
104
105 double x, y;
106 double x_center, y_center;
107 double x_scale, y_scale;
108 double width, height;
109 };
110
111 static Ptr<FacemarkLBF> create(const FacemarkLBF::Params &parameters = FacemarkLBF::Params() );
112 virtual ~FacemarkLBF(){};
113}; /* LBF */
114
116
117} /* namespace face */
118}/* namespace cv */
119
120 #endif
File Storage Node class.
Definition: persistence.hpp:482
XML/YAML/JSON file storage class that encapsulates all the information necessary for writing or readi...
Definition: persistence.hpp:304
n-dimensional dense array class
Definition: mat.hpp:802
Template class for 2D rectangles
Definition: core/types.hpp:421
Definition: facemarkLBF.hpp:96
Definition: facemarkLBF.hpp:49
Abstract base class for trainable facemark models
Definition: facemark_train.hpp:263
cv
"black box" representation of the file storage associated with a file on disk.
Definition: aruco.hpp:75
Definition: cvstd_wrapper.hpp:74
Definition: facemarkLBF.hpp:52
int initShape_n
multiplier for augment the training data
Definition: facemarkLBF.hpp:67
int n_landmarks
number of landmark points
Definition: facemarkLBF.hpp:65
String cascade_face
filename of the face detector model
Definition: facemarkLBF.hpp:60
int tree_n
number of tree in the model for each landmark point refinement
Definition: facemarkLBF.hpp:72
int tree_depth
the depth of decision tree, defines the size of feature
Definition: facemarkLBF.hpp:74
int stages_n
number of refinement stages
Definition: facemarkLBF.hpp:70
std::string model_filename
filename where the trained model will be saved
Definition: facemarkLBF.hpp:79
double shape_offset
offset for the loaded face landmark points
Definition: facemarkLBF.hpp:58
bool save_model
flag to save the trained model or not
Definition: facemarkLBF.hpp:81
unsigned int seed
seed for shuffling the training data
Definition: facemarkLBF.hpp:82
double bagging_overlap
overlap ratio for training the LBF feature
Definition: facemarkLBF.hpp:76
bool verbose
show the training print-out
Definition: facemarkLBF.hpp:62