Class cv::face::LBPHFaceRecognizer#
#include <opencv2/face/facerec.hpp>Collaboration diagram for cv::face::LBPHFaceRecognizer:
Public Member Functions#
Public Member Functions inherited from cv::face::FaceRecognizer
Return |
Name |
Description |
|---|---|---|
|
||
Gets string information by label. |
||
|
Gets vector of labels by string. |
|
|
threshold parameter accessor - required for default BestMinDist collector |
|
|
||
|
Predicts a label and associated confidence (e.g. distance) for a given input image. |
|
|
|
if implemented - send all result of prediction to collector that can be used for somehow custom result handling |
|
||
|
Loads a FaceRecognizer and its model state. |
|
|
Sets string info for the specified model’s label. |
|
|
Sets threshold of model. |
|
|
Trains a FaceRecognizer with given data and associated labels. |
|
|
Updates a FaceRecognizer with given data and associated labels. |
|
|
Saves a FaceRecognizer and its model state. |
|
|
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 |
|---|---|---|
|
Protected Attributes inherited from cv::face::FaceRecognizer
Return |
Name |
Description |
|---|---|---|
|
Member Function Documentation#
getGridX()#
int cv::face::LBPHFaceRecognizer::getGridX()
See also
getGridY()#
int cv::face::LBPHFaceRecognizer::getGridY()
See also
getHistograms()#
std::vector< cv::Mat > cv::face::LBPHFaceRecognizer::getHistograms()
getLabels()#
cv::Mat cv::face::LBPHFaceRecognizer::getLabels()
getNeighbors()#
int cv::face::LBPHFaceRecognizer::getNeighbors()
See also
getRadius()#
int cv::face::LBPHFaceRecognizer::getRadius()
See also
getThreshold()#
double cv::face::LBPHFaceRecognizer::getThreshold()
See also
setGridX()#
void cv::face::LBPHFaceRecognizer::setGridX(int val)
See also
setGridY()#
void cv::face::LBPHFaceRecognizer::setGridY(int val)
See also
setNeighbors()#
void cv::face::LBPHFaceRecognizer::setNeighbors(int val)
See also
setRadius()#
void cv::face::LBPHFaceRecognizer::setRadius(int val)
See also
setThreshold()#
void cv::face::LBPHFaceRecognizer::setThreshold(double val)
See also
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 )
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:#
radius see LBPHFaceRecognizer::create.
neighbors see LBPHFaceRecognizer::create.
grid_x see LLBPHFaceRecognizer::create.
grid_y see LBPHFaceRecognizer::create.
threshold see LBPHFaceRecognizer::create.
histograms Local Binary Patterns Histograms calculated from the given training data (empty if none was given).
labels Labels corresponding to the calculated Local Binary Patterns Histograms.
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 use8sample 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.
Source file#
The documentation for this class was generated from the following file:
opencv2/face/facerec.hpp