Constructor
obj = cv.LBPHFaceRecognizer('OptionName',optionValue, ...)
Options
- Radius The radius used for building the Circular Local
Binary Pattern. The greater the radius, the smoother the image
but more spatial information you can get. default 1
- Neighbors 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. default 8
- GridX 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. default 8
- GridY 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. default 8
- Threshold The threshold applied in the prediction. If the
distance to the nearest neighbor is larger than the threshold,
the prediction returns -1. default
realmax
Initializes this LBPH Model. The current implementation is
rather fixed as it uses the Extended Local Binary Patterns per
default.
Radius
and Neighbors
are used in the local binary patterns
creation. GridX
and GridY
control the grid size of the
spatial histograms.
Notes
- The Circular Local Binary Patterns (used in training and
prediction) expect the data given as grayscale images, use
cv.cvtColor to convert between the color spaces.
- This model supports updating.