OpenCV for Unity 2.6.5
Enox Software / Please refer to OpenCV official document ( http://docs.opencv.org/4.10.0/index.html ) for the details of the argument of the method.
Loading...
Searching...
No Matches
OpenCVForUnity.FaceModule.LBPHFaceRecognizer Class Reference

Public Member Functions

int getGridX ()
 
int getGridY ()
 
List< MatgetHistograms ()
 
Mat getLabels ()
 
int getNeighbors ()
 
int getRadius ()
 
double getThreshold ()
 
void setGridX (int val)
 
void setGridY (int val)
 
void setNeighbors (int val)
 
void setRadius (int val)
 
void setThreshold (double val)
 
- Public Member Functions inherited from OpenCVForUnity.FaceModule.FaceRecognizer
string getLabelInfo (int label)
 Gets string information by label.
 
MatOfInt getLabelsByString (string str)
 Gets vector of labels by string.
 
void predict (Mat src, int[] label, double[] confidence)
 Predicts a label and associated confidence (e.g. distance) for a given input image.
 
void predict_collect (Mat src, PredictCollector collector)
 
int predict_label (Mat src)
 
void read (string filename)
 Loads a FaceRecognizer and its model state.
 
void setLabelInfo (int label, string strInfo)
 Sets string info for the specified model's label.
 
void train (List< Mat > src, Mat labels)
 Trains a FaceRecognizer with given data and associated labels.
 
void update (List< Mat > src, Mat labels)
 Updates a FaceRecognizer with given data and associated labels.
 
void write (string filename)
 Saves a FaceRecognizer and its model state.
 
- Public Member Functions inherited from OpenCVForUnity.CoreModule.Algorithm
virtual void clear ()
 Clears the algorithm state.
 
virtual bool empty ()
 Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read.
 
virtual string getDefaultName ()
 
IntPtr getNativeObjAddr ()
 
void save (string filename)
 
- Public Member Functions inherited from OpenCVForUnity.DisposableObject
void Dispose ()
 
void ThrowIfDisposed ()
 

Static Public Member Functions

static new LBPHFaceRecognizer __fromPtr__ (IntPtr addr)
 
static LBPHFaceRecognizer create ()
 
static LBPHFaceRecognizer create (int radius)
 
static LBPHFaceRecognizer create (int radius, int neighbors)
 
static LBPHFaceRecognizer create (int radius, int neighbors, int grid_x)
 
static LBPHFaceRecognizer create (int radius, int neighbors, int grid_x, int grid_y)
 
static LBPHFaceRecognizer create (int radius, int neighbors, int grid_x, int grid_y, double threshold)
 
- Static Public Member Functions inherited from OpenCVForUnity.FaceModule.FaceRecognizer
static new FaceRecognizer __fromPtr__ (IntPtr addr)
 
- Static Public Member Functions inherited from OpenCVForUnity.CoreModule.Algorithm
static Algorithm __fromPtr__ (IntPtr addr)
 
- Static Public Member Functions inherited from OpenCVForUnity.DisposableObject
static IntPtr ThrowIfNullIntPtr (IntPtr ptr)
 

Protected Member Functions

override void Dispose (bool disposing)
 
- Protected Member Functions inherited from OpenCVForUnity.FaceModule.FaceRecognizer
- Protected Member Functions inherited from OpenCVForUnity.CoreModule.Algorithm
- Protected Member Functions inherited from OpenCVForUnity.DisposableOpenCVObject
 DisposableOpenCVObject ()
 
 DisposableOpenCVObject (bool isEnabledDispose)
 
 DisposableOpenCVObject (IntPtr ptr)
 
 DisposableOpenCVObject (IntPtr ptr, bool isEnabledDispose)
 
- Protected Member Functions inherited from OpenCVForUnity.DisposableObject
 DisposableObject ()
 
 DisposableObject (bool isEnabledDispose)
 

Additional Inherited Members

- Package Functions inherited from OpenCVForUnity.FaceModule.FaceRecognizer
- Package Functions inherited from OpenCVForUnity.CoreModule.Algorithm
- Package Attributes inherited from OpenCVForUnity.DisposableOpenCVObject
- Properties inherited from OpenCVForUnity.DisposableObject
bool IsDisposed [get, protected set]
 
bool IsEnabledDispose [get, set]
 

Member Function Documentation

◆ __fromPtr__()

static new LBPHFaceRecognizer OpenCVForUnity.FaceModule.LBPHFaceRecognizer.__fromPtr__ ( IntPtr addr)
static

◆ create() [1/6]

static LBPHFaceRecognizer OpenCVForUnity.FaceModule.LBPHFaceRecognizer.create ( )
static
Parameters
radiusThe radius used for building the Circular Local Binary Pattern. The greater the radius, the smoother the image but more spatial information you can get.
neighborsThe 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.
grid_xThe 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_yThe 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.
thresholdThe threshold applied in the prediction. If the distance to the nearest neighbor is larger than the threshold, this method returns -1.

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:

◆ create() [2/6]

static LBPHFaceRecognizer OpenCVForUnity.FaceModule.LBPHFaceRecognizer.create ( int radius)
static
Parameters
radiusThe radius used for building the Circular Local Binary Pattern. The greater the radius, the smoother the image but more spatial information you can get.
neighborsThe 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.
grid_xThe 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_yThe 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.
thresholdThe threshold applied in the prediction. If the distance to the nearest neighbor is larger than the threshold, this method returns -1.

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:

◆ create() [3/6]

static LBPHFaceRecognizer OpenCVForUnity.FaceModule.LBPHFaceRecognizer.create ( int radius,
int neighbors )
static
Parameters
radiusThe radius used for building the Circular Local Binary Pattern. The greater the radius, the smoother the image but more spatial information you can get.
neighborsThe 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.
grid_xThe 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_yThe 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.
thresholdThe threshold applied in the prediction. If the distance to the nearest neighbor is larger than the threshold, this method returns -1.

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:

◆ create() [4/6]

static LBPHFaceRecognizer OpenCVForUnity.FaceModule.LBPHFaceRecognizer.create ( int radius,
int neighbors,
int grid_x )
static
Parameters
radiusThe radius used for building the Circular Local Binary Pattern. The greater the radius, the smoother the image but more spatial information you can get.
neighborsThe 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.
grid_xThe 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_yThe 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.
thresholdThe threshold applied in the prediction. If the distance to the nearest neighbor is larger than the threshold, this method returns -1.

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:

◆ create() [5/6]

static LBPHFaceRecognizer OpenCVForUnity.FaceModule.LBPHFaceRecognizer.create ( int radius,
int neighbors,
int grid_x,
int grid_y )
static
Parameters
radiusThe radius used for building the Circular Local Binary Pattern. The greater the radius, the smoother the image but more spatial information you can get.
neighborsThe 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.
grid_xThe 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_yThe 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.
thresholdThe threshold applied in the prediction. If the distance to the nearest neighbor is larger than the threshold, this method returns -1.

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:

◆ create() [6/6]

static LBPHFaceRecognizer OpenCVForUnity.FaceModule.LBPHFaceRecognizer.create ( int radius,
int neighbors,
int grid_x,
int grid_y,
double threshold )
static
Parameters
radiusThe radius used for building the Circular Local Binary Pattern. The greater the radius, the smoother the image but more spatial information you can get.
neighborsThe 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.
grid_xThe 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_yThe 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.
thresholdThe threshold applied in the prediction. If the distance to the nearest neighbor is larger than the threshold, this method returns -1.

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:

◆ Dispose()

override void OpenCVForUnity.FaceModule.LBPHFaceRecognizer.Dispose ( bool disposing)
protectedvirtual

◆ getGridX()

int OpenCVForUnity.FaceModule.LBPHFaceRecognizer.getGridX ( )
See also
setGridX

◆ getGridY()

int OpenCVForUnity.FaceModule.LBPHFaceRecognizer.getGridY ( )
See also
setGridY

◆ getHistograms()

List< Mat > OpenCVForUnity.FaceModule.LBPHFaceRecognizer.getHistograms ( )

◆ getLabels()

Mat OpenCVForUnity.FaceModule.LBPHFaceRecognizer.getLabels ( )

◆ getNeighbors()

int OpenCVForUnity.FaceModule.LBPHFaceRecognizer.getNeighbors ( )
See also
setNeighbors

◆ getRadius()

int OpenCVForUnity.FaceModule.LBPHFaceRecognizer.getRadius ( )
See also
setRadius

◆ getThreshold()

double OpenCVForUnity.FaceModule.LBPHFaceRecognizer.getThreshold ( )
See also
setThreshold

◆ setGridX()

void OpenCVForUnity.FaceModule.LBPHFaceRecognizer.setGridX ( int val)
See also
getGridX

◆ setGridY()

void OpenCVForUnity.FaceModule.LBPHFaceRecognizer.setGridY ( int val)
See also
getGridY

◆ setNeighbors()

void OpenCVForUnity.FaceModule.LBPHFaceRecognizer.setNeighbors ( int val)
See also
getNeighbors

◆ setRadius()

void OpenCVForUnity.FaceModule.LBPHFaceRecognizer.setRadius ( int val)
See also
getRadius

◆ setThreshold()

void OpenCVForUnity.FaceModule.LBPHFaceRecognizer.setThreshold ( double val)
See also
getThreshold

The documentation for this class was generated from the following file: