Show / Hide Table of Contents

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
DisposableObject
DisposableCvObject
Algorithm
FaceRecognizer
BasicFaceRecognizer
LBPHFaceRecognizer
Implements
ICvPtrHolder
Inherited Members
Algorithm.Empty
Algorithm.Save(String)
Algorithm.GetDefaultName()
DisposableCvObject.ptr
DisposableCvObject.DisposeUnmanaged()
DisposableCvObject.CvPtr
DisposableObject.DataHandle
DisposableObject.IsDisposed
DisposableObject.IsEnabledDispose
DisposableObject.AllocatedMemory
DisposableObject.AllocatedMemorySize
DisposableObject.Dispose()
DisposableObject.Dispose(Boolean)
DisposableObject.DisposeManaged()
DisposableObject.AllocGCHandle(Object)
DisposableObject.AllocMemory(Int32)
DisposableObject.NotifyMemoryPressure(Int64)
DisposableObject.ThrowIfDisposed()
Namespace: OpenCvSharp.Face
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

Predict(InputArray)

Gets a prediction from a FaceRecognizer.

Declaration
public virtual int Predict(InputArray src)
Parameters
Type Name Description
InputArray src
Returns
Type Description
System.Int32
| Improve this Doc View Source

Predict(InputArray, out Int32, out Double)

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
Type Name Description
FileNode fn
Overrides
Algorithm.Read(FileNode)
| 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)

Sets threshold of model

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
Type Name Description
FileStorage fs
Overrides
Algorithm.Write(FileStorage)
| 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

ICvPtrHolder
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX