OpenCV for Unity  2.6.0
Enox Software / Please refer to OpenCV official document ( http://docs.opencv.org/4.9.0/index.html ) for the details of the argument of the method.
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
OpenCVForUnity.FaceModule.LBPHFaceRecognizer Class Reference
Inheritance diagram for OpenCVForUnity.FaceModule.LBPHFaceRecognizer:
OpenCVForUnity.FaceModule.FaceRecognizer OpenCVForUnity.CoreModule.Algorithm OpenCVForUnity.DisposableOpenCVObject OpenCVForUnity.DisposableObject

Public Member Functions

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

Static Public Member Functions

static new LBPHFaceRecognizer __fromPtr__ (IntPtr addr)
 
static LBPHFaceRecognizer create (int radius, int neighbors, int grid_x, int grid_y, double threshold)
 
static LBPHFaceRecognizer create (int radius, int neighbors, int grid_x, int grid_y)
 
static LBPHFaceRecognizer create (int radius, int neighbors, int grid_x)
 
static LBPHFaceRecognizer create (int radius, int neighbors)
 
static LBPHFaceRecognizer create (int radius)
 
static LBPHFaceRecognizer create ()
 
- 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.DisposableOpenCVObject
 DisposableOpenCVObject ()
 
 DisposableOpenCVObject (IntPtr ptr)
 
 DisposableOpenCVObject (bool isEnabledDispose)
 
 DisposableOpenCVObject (IntPtr ptr, bool isEnabledDispose)
 
- Protected Member Functions inherited from OpenCVForUnity.DisposableObject
 DisposableObject ()
 
 DisposableObject (bool isEnabledDispose)
 

Additional Inherited Members

- 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 ( 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:

◆ create() [2/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() [3/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() [4/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() [5/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() [6/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:

◆ 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: