Class FaceRecognizer
Abstract base class for all face recognition models.
All face recognition models in OpenCV are derived from the abstract base class FaceRecognizer, which
provides a unified access to all face recongition algorithms in OpenCV.
Inheritance
System.Object
FaceRecognizer
Assembly: OpenCvSharp.dll
Syntax
public abstract class FaceRecognizer : Algorithm, ICvPtrHolder
Methods
|
Improve this Doc
View Source
GetLabelInfo(Int32)
Gets string information by label.
If an unknown label id is provided or there is no label information associated with the specified
label id the method returns an empty string.
Declaration
public string GetLabelInfo(int label)
Parameters
Type |
Name |
Description |
System.Int32 |
label |
|
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
GetLabelsByString(String)
Gets vector of labels by string.
The function searches for the labels containing the specified sub-string in the associated string info.
Declaration
public int[] GetLabelsByString(string str)
Parameters
Type |
Name |
Description |
System.String |
str |
|
Returns
Type |
Description |
System.Int32[] |
|
|
Improve this Doc
View Source
GetThreshold()
threshold parameter accessor - required for default BestMinDist collector
Declaration
public double GetThreshold()
Returns
Type |
Description |
System.Double |
|
|
Improve this Doc
View Source
Gets a prediction from a FaceRecognizer.
Declaration
public virtual int Predict(InputArray src)
Parameters
Returns
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
Predicts the label and confidence for a given sample.
Declaration
public virtual void Predict(InputArray src, out int label, out double confidence)
Parameters
Type |
Name |
Description |
InputArray |
src |
|
System.Int32 |
label |
|
System.Double |
confidence |
|
|
Improve this Doc
View Source
Read(FileNode)
Deserializes this object from a given cv::FileNode.
Declaration
public override void Read(FileNode fn)
Parameters
Overrides
|
Improve this Doc
View Source
Read(String)
Deserializes this object from a given filename.
Declaration
public virtual void Read(string fileName)
Parameters
Type |
Name |
Description |
System.String |
fileName |
|
|
Improve this Doc
View Source
SetLabelInfo(Int32, String)
Sets string info for the specified model's label.
The string info is replaced by the provided value if it was set before for the specified label.
Declaration
public void SetLabelInfo(int label, string strInfo)
Parameters
Type |
Name |
Description |
System.Int32 |
label |
|
System.String |
strInfo |
|
|
Improve this Doc
View Source
SetThreshold(Double)
Declaration
public void SetThreshold(double val)
Parameters
Type |
Name |
Description |
System.Double |
val |
|
|
Improve this Doc
View Source
Train(IEnumerable<Mat>, IEnumerable<Int32>)
Trains a FaceRecognizer with given data and associated labels.
Declaration
public virtual void Train(IEnumerable<Mat> src, IEnumerable<int> labels)
Parameters
Type |
Name |
Description |
IEnumerable<Mat> |
src |
|
IEnumerable<System.Int32> |
labels |
|
|
Improve this Doc
View Source
Update(IEnumerable<Mat>, IEnumerable<Int32>)
Updates a FaceRecognizer with given data and associated labels.
Declaration
public void Update(IEnumerable<Mat> src, IEnumerable<int> labels)
Parameters
Type |
Name |
Description |
IEnumerable<Mat> |
src |
|
IEnumerable<System.Int32> |
labels |
|
|
Improve this Doc
View Source
Write(FileStorage)
Serializes this object to a given cv::FileStorage.
Declaration
public override void Write(FileStorage fs)
Parameters
Overrides
|
Improve this Doc
View Source
Write(String)
Serializes this object to a given filename.
Declaration
public virtual void Write(string fileName)
Parameters
Type |
Name |
Description |
System.String |
fileName |
|
Implements