|  | OpenCV
    4.5.4
    Open Source Computer Vision | 
#include <opencv2/face/facerec.hpp>
 
  
 | Static Public Member Functions | |
| static Ptr< FisherFaceRecognizer > | create (int num_components=0, double threshold=DBL_MAX) | 
|  Static Public Member Functions inherited from cv::Algorithm | |
| template<typename _Tp > | |
| static Ptr< _Tp > | load (const String &filename, const String &objname=String()) | 
| Loads algorithm from the file.  More... | |
| template<typename _Tp > | |
| static Ptr< _Tp > | loadFromString (const String &strModel, const String &objname=String()) | 
| Loads algorithm from a String.  More... | |
| template<typename _Tp > | |
| static Ptr< _Tp > | read (const FileNode &fn) | 
| Reads algorithm from the file node.  More... | |
| Additional Inherited Members | |
|  Public Member Functions inherited from cv::face::BasicFaceRecognizer | |
| virtual bool | empty () const CV_OVERRIDE | 
| cv::Mat | getEigenValues () const | 
| cv::Mat | getEigenVectors () const | 
| cv::Mat | getLabels () const | 
| cv::Mat | getMean () const | 
| int | getNumComponents () const | 
| std::vector< cv::Mat > | getProjections () const | 
| double | getThreshold () const CV_OVERRIDE | 
| virtual void | read (const FileNode &fn) CV_OVERRIDE | 
| void | setNumComponents (int val) | 
| void | setThreshold (double val) CV_OVERRIDE | 
| virtual void | write (FileStorage &fs) const CV_OVERRIDE | 
|  Public Member Functions inherited from cv::face::FaceRecognizer | |
| virtual String | getLabelInfo (int label) const | 
| Gets string information by label.  More... | |
| virtual std::vector< int > | getLabelsByString (const String &str) const | 
| Gets vector of labels by string.  More... | |
| int | predict (InputArray src) const | 
| void | predict (InputArray src, int &label, double &confidence) const | 
| Predicts a label and associated confidence (e.g. distance) for a given input image.  More... | |
| virtual void | predict (InputArray src, Ptr< PredictCollector > collector) const =0 | 
| 
 | |
| virtual void | read (const String &filename) | 
| Loads a FaceRecognizer and its model state.  More... | |
| virtual void | setLabelInfo (int label, const String &strInfo) | 
| Sets string info for the specified model's label.  More... | |
| virtual void | train (InputArrayOfArrays src, InputArray labels)=0 | 
| Trains a FaceRecognizer with given data and associated labels.  More... | |
| virtual void | update (InputArrayOfArrays src, InputArray labels) | 
| Updates a FaceRecognizer with given data and associated labels.  More... | |
| virtual void | write (const String &filename) const | 
| Saves a FaceRecognizer and its model state.  More... | |
|  Public Member Functions inherited from cv::Algorithm | |
| Algorithm () | |
| virtual | ~Algorithm () | 
| virtual void | clear () | 
| Clears the algorithm state.  More... | |
| virtual String | getDefaultName () const | 
| virtual void | save (const String &filename) const | 
| void | write (const Ptr< FileStorage > &fs, const String &name=String()) const | 
| simplified API for language bindings This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.  More... | |
|  Protected Member Functions inherited from cv::Algorithm | |
| void | writeFormat (FileStorage &fs) const | 
|  Protected Attributes inherited from cv::face::BasicFaceRecognizer | |
| Mat | _eigenvalues | 
| Mat | _eigenvectors | 
| Mat | _labels | 
| Mat | _mean | 
| int | _num_components | 
| std::vector< Mat > | _projections | 
| double | _threshold | 
|  Protected Attributes inherited from cv::face::FaceRecognizer | |
| std::map< int, String > | _labelsInfo | 
| 
 | static | 
| Python: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| cv.face.FisherFaceRecognizer_create( | [, num_components[, threshold]] | ) -> | retval | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| num_components | The number of components (read: Fisherfaces) kept for this Linear Discriminant Analysis with the Fisherfaces criterion. It's useful to keep all components, that means the number of your classes c (read: subjects, persons you want to recognize). If you leave this at the default (0) or set it to a value less-equal 0 or greater (c-1), it will be set to the correct number (c-1) automatically. | 
| threshold | The threshold applied in the prediction. If the distance to the nearest neighbor is larger than the threshold, this method returns -1. | 
 1.8.13
 1.8.13