Table of Contents

Class LBPHFaceRecognizer

Namespace
OpenCvSharp.Face
Assembly
OpenCvSharp.dll

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.

public class LBPHFaceRecognizer : FaceRecognizer, IDisposable, ICvPtrHolder
Inheritance
LBPHFaceRecognizer
Implements
Inherited Members

Constructors

LBPHFaceRecognizer()

protected LBPHFaceRecognizer()

Methods

Create(int, int, int, int, double)

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.

public static LBPHFaceRecognizer Create(int radius = 1, int neighbors = 8, int gridX = 8, int gridY = 8, double threshold = 1.7976931348623157E+308)

Parameters

radius int

The radius used for building the Circular Local Binary Pattern. The greater the radius, the

neighbors int

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.

gridX int

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.

gridY int

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 double

The threshold applied in the prediction. If the distance to the nearest neighbor is larger than the threshold, this method returns -1.

Returns

LBPHFaceRecognizer

DisposeManaged()

Releases managed resources

protected override void DisposeManaged()

GetGridX()

public virtual int GetGridX()

Returns

int

GetGridY()

public virtual int GetGridY()

Returns

int

GetHistograms()

public virtual Mat[] GetHistograms()

Returns

Mat[]

GetLabels()

public virtual Mat GetLabels()

Returns

Mat

GetNeighbors()

public virtual int GetNeighbors()

Returns

int

GetRadius()

public virtual int GetRadius()

Returns

int

GetThreshold()

public virtual double GetThreshold()

Returns

double

SetGridX(int)

public virtual void SetGridX(int val)

Parameters

val int

SetGridY(int)

public virtual void SetGridY(int val)

Parameters

val int

SetNeighbors(int)

public virtual void SetNeighbors(int val)

Parameters

val int

SetRadius(int)

public virtual void SetRadius(int val)

Parameters

val int

SetThreshold(double)

public virtual void SetThreshold(double val)

Parameters

val double