#include <opencv2/face/facerec.hpp>
◆ create()
static Ptr<LBPHFaceRecognizer> cv::face::LBPHFaceRecognizer::create |
( |
int |
radius = 1 , |
|
|
int |
neighbors = 8 , |
|
|
int |
grid_x = 8 , |
|
|
int |
grid_y = 8 , |
|
|
double |
threshold = DBL_MAX |
|
) |
| |
|
static |
Python: |
---|
| cv.face.LBPHFaceRecognizer.create( | [, radius[, neighbors[, grid_x[, grid_y[, threshold]]]]] | ) -> | retval |
| cv.face.LBPHFaceRecognizer_create( | [, radius[, neighbors[, grid_x[, grid_y[, threshold]]]]] | ) -> | retval |
- Parameters
-
radius | The radius used for building the Circular Local Binary Pattern. The greater the radius, the smoother the image but more spatial information you can get. |
neighbors | The number of sample points to build a Circular Local Binary Pattern from. An appropriate value is to use 8 sample points. Keep in mind: the more sample points you include, the higher the computational cost. |
grid_x | The number of cells in the horizontal direction, 8 is a common value used in publications. The more cells, the finer the grid, the higher the dimensionality of the resulting feature vector. |
grid_y | The number of cells in the vertical direction, 8 is a common value used in publications. The more cells, the finer the grid, the higher the dimensionality of the resulting feature vector. |
threshold | The threshold applied in the prediction. If the distance to the nearest neighbor is larger than the threshold, this method returns -1. |
Notes:
- The Circular Local Binary Patterns (used in training and prediction) expect the data given as grayscale images, use cvtColor to convert between the color spaces.
- This model supports updating.
Model internal data:
◆ getGridX()
virtual int cv::face::LBPHFaceRecognizer::getGridX |
( |
| ) |
const |
|
pure virtual |
Python: |
---|
| cv.face.LBPHFaceRecognizer.getGridX( | | ) -> | retval |
◆ getGridY()
virtual int cv::face::LBPHFaceRecognizer::getGridY |
( |
| ) |
const |
|
pure virtual |
Python: |
---|
| cv.face.LBPHFaceRecognizer.getGridY( | | ) -> | retval |
◆ getHistograms()
virtual std::vector<cv::Mat> cv::face::LBPHFaceRecognizer::getHistograms |
( |
| ) |
const |
|
pure virtual |
Python: |
---|
| cv.face.LBPHFaceRecognizer.getHistograms( | | ) -> | retval |
◆ getLabels()
virtual cv::Mat cv::face::LBPHFaceRecognizer::getLabels |
( |
| ) |
const |
|
pure virtual |
Python: |
---|
| cv.face.LBPHFaceRecognizer.getLabels( | | ) -> | retval |
◆ getNeighbors()
virtual int cv::face::LBPHFaceRecognizer::getNeighbors |
( |
| ) |
const |
|
pure virtual |
Python: |
---|
| cv.face.LBPHFaceRecognizer.getNeighbors( | | ) -> | retval |
◆ getRadius()
virtual int cv::face::LBPHFaceRecognizer::getRadius |
( |
| ) |
const |
|
pure virtual |
Python: |
---|
| cv.face.LBPHFaceRecognizer.getRadius( | | ) -> | retval |
◆ getThreshold()
virtual double cv::face::LBPHFaceRecognizer::getThreshold |
( |
| ) |
const |
|
pure virtual |
Python: |
---|
| cv.face.LBPHFaceRecognizer.getThreshold( | | ) -> | retval |
◆ setGridX()
virtual void cv::face::LBPHFaceRecognizer::setGridX |
( |
int |
val | ) |
|
|
pure virtual |
Python: |
---|
| cv.face.LBPHFaceRecognizer.setGridX( | val | ) -> | None |
◆ setGridY()
virtual void cv::face::LBPHFaceRecognizer::setGridY |
( |
int |
val | ) |
|
|
pure virtual |
Python: |
---|
| cv.face.LBPHFaceRecognizer.setGridY( | val | ) -> | None |
◆ setNeighbors()
virtual void cv::face::LBPHFaceRecognizer::setNeighbors |
( |
int |
val | ) |
|
|
pure virtual |
Python: |
---|
| cv.face.LBPHFaceRecognizer.setNeighbors( | val | ) -> | None |
◆ setRadius()
virtual void cv::face::LBPHFaceRecognizer::setRadius |
( |
int |
val | ) |
|
|
pure virtual |
Python: |
---|
| cv.face.LBPHFaceRecognizer.setRadius( | val | ) -> | None |
◆ setThreshold()
virtual void cv::face::LBPHFaceRecognizer::setThreshold |
( |
double |
val | ) |
|
|
pure virtual |
Python: |
---|
| cv.face.LBPHFaceRecognizer.setThreshold( | val | ) -> | None |
The documentation for this class was generated from the following file: